Hepen
asked on
Form Search Box Question
http://www.test.com/search/jrs.aspx?test=50&scr=1024x768&keyw=cars&url=This.com
The above url is an example... Lets say the above URL returns a form with seach box in it and search button.
How do I get that form to post to the above url with the above parameters?
I really never understood how form posting getting or whatever works, it was very confusing lol.
The above url is an example... Lets say the above URL returns a form with seach box in it and search button.
How do I get that form to post to the above url with the above parameters?
I really never understood how form posting getting or whatever works, it was very confusing lol.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I pass the existing parameters to the page that gets posted?
jrs.aspx?test=50&scr=1024x 768&keyw=c ars&url=Th is.com
jrs.aspx?test=50&scr=1024x
Here's a basic explanation: when "jrs.aspx?test=50&scr=1024 x768&keyw= cars&url=T his.com" gets called, jrs.aspx will have statements in there that will do stuff based on the parameters, like maybe:
if test is greater or equal to 50, tell the user that they've reached their limit of tests, and since "scr" = 1024x768, show the test results in a page optimzed to that screen resolution.
You could also use javascript to parse the url and make choices based on that. But javascript is client-side, whereas my prior example gets executed on the server and does it's parsing before the page actually makes it to the client.
if test is greater or equal to 50, tell the user that they've reached their limit of tests, and since "scr" = 1024x768, show the test results in a page optimzed to that screen resolution.
You could also use javascript to parse the url and make choices based on that. But javascript is client-side, whereas my prior example gets executed on the server and does it's parsing before the page actually makes it to the client.
ASKER
TedInAK that I understand.
Lets say jrs.aspx has a form on it and I want to use the existing information from test, scr, keyw & url. How can I use these existing parameters? In this case 508,1024x768, cars & this.com .. how can I save that to use it again on another form post
Lets say jrs.aspx has a form on it and I want to use the existing information from test, scr, keyw & url. How can I use these existing parameters? In this case 508,1024x768, cars & this.com .. how can I save that to use it again on another form post
If by save you mean to populate the form fields with that data, best way would be to do it server-side using ASP.net's built-in tools. Is that what you mean?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<!-- Submit via link and submit button -->
<form name="magic" target=_self method="GET" action="http://www.google.ca/search">
<input type=submit name="sendme" value="Google.ca">
<input type=text name=q size=31 maxlength=2048 value="key" title="Search">
</form>
<a href="#" onclick="document.magic.ac
<B>Search Google.com</B></a>