Reputation: 1845
Is there a way to have a select
drop menu showing multiple
option
s at ago but the user can only click
on a single Item... How to restrict them from highlighting all options at ago even though they can see all the options?
Example
<form action="">
<select name="cars" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<input type="submit">
</form>
<strong>They Should NOT Highlight or select more than one option at a go!!</strong>
I want the user to NEVER Highlight all option
s at ago because that will submit
all options to the SERVER-SIDE Script
and Err.
See it in action here: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple
Go to that link and try to highlight all options and Submit
the query... You'll see all option
s are submitted. How to prevent that multiple highlighting even when they click CTRL
+option
after option
?
Upvotes: 1
Views: 170
Reputation: 2509
Dont use multiple
set a size
to it
<form action="">
<select name="cars" size="4">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<input type="submit">
</form>
Upvotes: 1
Reputation: 2506
From:
<select name="cars" multiple>
To:
<select name="cars">
Upvotes: 0