[thelist] ASP & HTML: Pass double data from a Select

Rob Smith rob.smith at THERMON.com
Tue Jul 15 13:14:39 CDT 2003


Casey,

<><><><><><><><><>><><><><><><><><><><><><><><><><><
I need to pass BOTH the value (1 or 2) and the user-visible options (apples
or peaches).  Before committing to the database, which will contain the
value (1 or 2) the user will have a preview page, which will need to show
the fruit they selected.  1 and 2 mean nothing to the user.

What's the best way to pass along both values?  

<><><><><><><><><><><><><><><><><><><><><><><><><><>

use the attribute "multiple" in your select tag.

<form action="test.asp" name="test" method="get">
<select multiple name="multiple">
 <option value="1">Apples</option>
 <option value="2">Oranges</option>
</select>
<input type="submit" name="Submit" value="Submit">
</form>

your querystring will look like (if you select both):

test.asp?multiple=1&multiple=2&Submit=Submit

HTH,

Rob.Smith


More information about the thelist mailing list