Link to home
Start Free TrialLog in
Avatar of Hepen
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.

ASKER CERTIFIED SOLUTION
Avatar of callrs
callrs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of callrs
callrs

Try this simple Google search demo. Select, copy, paste into notepad, save & open in browser:

<!-- 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.action='http://www.google.com/search';document.magic.submit(); return false;">
<B>Search Google.com</B></a>
Avatar of Hepen

ASKER

How do I pass the existing parameters to the page that gets posted?

jrs.aspx?test=50&scr=1024x768&keyw=cars&url=This.com

Here's a basic explanation:  when "jrs.aspx?test=50&scr=1024x768&keyw=cars&url=This.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.
Avatar of Hepen

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
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial