EnexoOnoma
EnexoOnoma

Reputation: 8834

Possibility of two values in a select list?

is there a way to have two values in a select's option? I have made a redirection script based on the selected item but I would like to submit a value to the next page also.

Here is the select list

<select size="1" name="Products"
onchange="if(this.options.selectedIndex>0) location.href=this.options [this.options.selectedIndex].value">
<option value="">Please Select a Product</option>
<option value="page1.php">Design
Software</option>
<option value="page2.php">Manufacturing
Software</option>
<option value="page3.php">Machine Tools</option>
</select>

Thank you for your time!

Upvotes: 0

Views: 263

Answers (2)

Belinda
Belinda

Reputation: 1231

You could always try adding the extra variable as a GET variable to the url like so

<option value="page1.php?var=val">Design</option>

Upvotes: 1

jackJoe
jackJoe

Reputation: 11168

you could pick the value and also the content of the li, both can be different;

or, maybe have a separator (some character) in the value attribute and have two values there?

Upvotes: 0

Related Questions