Jump to content

netcracker

Members
  • Posts

    85
  • Joined

  • Last visited

Everything 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: What I didn't get is where do I insert thar part of code you told me last time: Don't get mad, just apreciate my willing to learn and support me please
  2. 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. I belive you, if you say that test_file works fine with you than it has got to be something with my IIS !! I just wonder what ?! I've been looking around for clues and couldn't find any...
  4. 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 !!!
  5. 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.
  6. thx for the swift response. 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.
  7. Here is a script that for some reason doesn't work.Need help on ASP 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, 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...