submittimg parameters with jump menus and list objects
overview
appending parameters to a jump menu
using a list to submit a form
using a
jump menu to submit a form
overview this page shows 3 different ways in which you might want to submit parameters using a "list" form object. since the main objective is to show how to create the menus, not how to evaluate the parameters, all forms redirect to this page and append the parameters to the URL (GET method). to see if the parameters were submitted correctly just check the URL of this page in the location field of your browser. |
|||
appending parameters to a jump menu this is quite straight forward. just create the jumpmenu as usual (could be static, could be dynamic) but when you enter the URLs you add parameters to it. like: listsubm.htm?jump=1
|
|||
|
(all options link back to this page). | ||
|
|||
using a list to submit a form this is not very difficult either - you create your form as usual but instead inserting a submit button you type onChange="submit()" into the <select> tag. you can do the same with other form objects. <form method="get" action="listsubm.htm"
name="form1">
|
|||
(all options link back to this page). | |||
|
|||
using a jump menu to submit a form lets say you have a few selection criteria that you want to pass on but the user should be able to chose between different locations to go to next. probably the easiest way is not to use a jump menu that works with clientside JavaScript but with a simple form submission (GET method) as shown above and to use ASP to do the redirection.
|
|||
(all options link back to this page but target different anchors. this is first of all a test for submitting URLs. not all browsers will necessarily scroll down to the anchors) | |||
this form uses an ASP page with the following code. you can use as many form elements as you like but the one that holds the URL for redirection has to be called "newlocation". (if you want you can use this script for any redirection of a form that has a field "newlocation", e.g. you could have a text field into which the user can enter an URL of choice). <%@LANGUAGE="VBSCRIPT"%> ' list all items from the Querystring
exept "newlocation" ' get rid of last "&" ' redirect ' bg, 5/8/2002
click here to download the page. |
|||
back to top | |||