Jump to content

netcracker

Members
  • Posts

    85
  • Joined

  • Last visited

Posts posted by netcracker

  1. okay, so we can all agree that my VB is sooo BAD ! I didn't wanna admit it at first, but it's obvious now... BUT I WANT TO LEARN !! :) so back to the script we've been discussing... we now have more files to include randomly.the script is like this:

    <%randomize() r=rnd()  if r>0 then%>    <!-- #include file="include/tblleft1.asp" -->  <%else%>    <!-- #include file="include/tblleft2.asp" -->  <%else%>    <!-- #include file="include/tblleft3.asp" -->  <%else%>    <!-- #include file="include/tblleft4.asp" --><%end if%>
    What I didn't get is where do I insert thar part of code you told me last time:
    randomizenr=int(rnd*4)+1
    Don't get mad, just apreciate my willing to learn and support me please :)
  2. unzip that file to you c:\inetpub\wwwroot and see if it works there, then try again on the server.
    yep! it seems that it only works in inetpubwwwroot !?! I cannot explain it, because I have the same settings on all sites (virtual folders)... It's all good then. Thank you verry verry much for all the help and support, and the source code :) ...One last question... if I have more files to include, say 4 I set the "r" to be "r>0.25" right ?!THX, you're the gratest ! :)
  3. here's a copy/paste of my testing asp file:<BODY><%randomize()r=rnd()if r>0.5 then%><!-- #include file="include/tblleft1.asp" --><%else%><!-- #include file="include/tblleft2.asp" --><%end if%> include/tblleft1.asp = <%=1%>include/tblleft2.asp = <%=2%></BODY>I have no ideea why it doesn't work. :) HELP ME, PLEASE !!! :)

  4. I get this ERROR: :( <<--Technical Information (for support personnel)Error Type:Microsoft JScript compilation (0x800A03ED)Expected '('/cartedeafaceri.ro/random.asp, line 12, column 3if r>0.5 then--^-->>Must be something with my IIS :) [ Internet Information Services | Microsoft Corporation | Version: 5.1 ]Since you say it works fine with you... gotta search for something wrong with my IIS, no dobt.Thank you still. :)

  5. thx for the swift response. :D so now it parses right :) but doesn't work the way I hoped it would.it includes both of the files in the source code and it does not randomize them, as I hoped... :)damn this is so much harder than expected. :(Please keep it comming, I really need the support and ideeas. This is supposed to be a script that inserts one file from a given few randomly. I need the files in the browser not in the source code.

  6. Here is a script that for some reason doesn't work.Need help on ASP :D A.S.A.P. please. This needs not be in VB but also JS, it's all the same to me. :) <script type="text/vbscript"> randomize() r=rnd() if r>0.5 then document.write("<!--#include file="include/file1.asp" -->") else document.write("<!--#include file="include/file2.asp" -->") end if</script>Also tried: :( <script type="text/vbscript"> randomize() dim text = '<!--#include file="include/file1.asp" -->' r=rnd() if r>0.5 then document.write (text) else document.write (text) end if</script>Still no good. :) The reason it doesn't work is "!" sign... :( I tried the use of "%21" in stead of that "!" but for the same result.Any recomandations, :blink: please?The purpose is to insert a random file into an ASP page. I didn't expect it to be this hard and anoying. :)

×
×
  • Create New...