|
-
Nov 28th, 2001, 08:30 AM
#1
Thread Starter
PowerPoster
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>
-
Nov 28th, 2001, 08:50 AM
#2
Frenzied Member
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...
-
Nov 28th, 2001, 08:52 AM
#3
Thread Starter
PowerPoster
thanks I'll give it a whirl
-
Nov 28th, 2001, 08:54 AM
#4
Thread Starter
PowerPoster
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>
-
Nov 28th, 2001, 08:58 AM
#5
Frenzied Member
In the ASP code:
response.redirect "url"
or in Javascript (I dont think this is where it should be though)
document.location = "url";
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|