I’ve got two multiple select lists
<html><head></head>
<body>
<select name="cars" multiple="multiple" size="7">
<option value="">-</option>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<select name="drivers" multiple="multiple" size="7">
<option value="1">Luiza</option>
<option value="2">Sebastian</option>
<option value="3">John</option>
<option value="4">Arthur</option>
<option value="5">Staszek</option>
<option value="6">Patryk</option>
<option value="7">Lucas</option>
<option value="8">Madlen</option>
<option value="9">Bartek</option>
<option value="10">Inter</option>
</select>
</body></html>
I have to select “drivers” depending on the “cars”
For example, when i select Volvo it atumatically should select Luiza, John and Staszek.
If i select saab, i must have selected Arthur, Inter, Lucas, Patryk
And if it is not possible, then after selecting from the “cars” select “drivers” should be disabled, and when i select “-” from “Cars”, “drivers” should be active again.
do this with ajax and load the data from database if it is possible.
or try this with jquery
and give id for case as “a1” and drivers for “a2”