Results 1 to 5 of 5

Thread: Executing the GET Method(also posted in VScript forum)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking Executing the GET Method(also posted in VScript forum)

    IS there a way I can execute the GET method from an HREF link and also pass one variable along with it?

    I have been using the code below which works but now I need to use the GET method anytime my user clicks on any of my various hyperlinks. I would rather NOT build a very long Querystring with the data I want to submit.
    Thanks

    Code:
    <A href="javascript:document.form.submit()" >Save Changes</A>

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Why don't you use a global Javascript variable or a hidden textbox that stores the querystring, and then send that when the Submit button is clicked?

    The GET method automatically sends the contents of the form in a QueryString...
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    thanks I'll give it a whirl

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    actually I found this from Serge. I like it very much but the MOD I need is to redirect the user after the form has been submitted.
    Thanks for any ideas...

    Code:
    <HTML>
    <SCRIPT Language=VBScript>
    Sub SubmitInfo
    	frmMyForm.submit
    End Sub
    </SCRIPT>
    </BODY>
    
    <FORM action="MyASPPage.asp" name=frmMyForm id=frmMyForm>
    UserName:<INPUT Type=Text name=txtName><BR>
    Password:<INPUT Type=Text name=txtPassword><BR>
    
    <BR>
    <U><P onclick="VBScript: SubmitInfo" style="cursor=hand">Submit</P></U>
    
    </FORM>
    
    </BODY>

  5. #5
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    In the ASP code:

    response.redirect "url"

    or in Javascript (I dont think this is where it should be though)

    document.location = "url";
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

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