Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Values in a Select Option

Status
Not open for further replies.

drose00

Technical User
Sep 16, 2006
3
US
I'm trying to pass multiple values when a user selects one option is a select menu. This would be the wrong version:

<select name="wrong">
<option>Select one</option>
<option value="bob" value2="dole">1</option>
<option value="george" value2="bush">2</option>
<option value="bart" value2="simpson">3</option>
</select>

Is this in any way possible?

Thanks!
 
You can't do that. You'll have to do something like this:

Code:
<option value="bob|dole">

and then split on the | (you could use many characters - the pipe is just an example).

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top