Results 1 to 5 of 5

Thread: passing querystring to ASP page with vbscript

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638

    passing querystring to ASP page with vbscript

    is there any way i could pass a querystring to another ASP page using vbscript? i can't do it using the onclick of a button, cos i'm building the querystring in a sub, so i have to do it from there. thanks.

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Code:
    <HTML>
    <HEAD>
    <SCRIPT Language="VBScript">
    Sub NewPage()
    	window.location.href = "Page2.asp?id=" & SomeVar
    End Sub
    </SCRIPT>
    </HEAD>
    <BODY>
    <INPUT type="Button" Value="Click Me" onclick="vbscript:NewPage">
    </BODY>
    </HTML>
    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    cool, thanks!

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    np, I actually typed one part of the code wrong, should be

    <INPUT type="Button" Value="Click Me" onclick="vbscript:NewPage()">

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    yeah, i've noticed that the server inserts that extra space in there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width