Posts: 2,536
Location: Western Maryland
|
Ok, I have a situation in which I have two option lists. Both are multi-select, but there is a twist. The values in List2 are dependent on values in List1.
HTML Code:
[b]List1[/b]
<select name="List1" multiple="multiple" size="3">
<option value="Category1">Category1</option>
<option value="Category2">Category2</option>
<option value="Category3">Category3</option>
</select>
[b]List2[/b]
<select name="List2" multiple="multiple" size="5">
<option value="Value1">Value1</option>
<option value="Value2">Value2</option>
<option value="Value3">Value3</option>
<option value="Value4">Value4</option>
<option value="Value5">Value5</option>
</select>
Let's say that Category1 has valid values of Value1 and Value5.
Category2 has valid values of Value1, Value2, Value3 and Value4.
Category3 has valid values of Value3, Value4 and Value5.
What I want is JavaScript which will smartly enable and disable the values in List2 as the categories in List1 are selected. Keep in mind that both lists are multi-select.
Thanks in advance.....
__________________
—Kyrnt
|