I have two dropdowns with non-identical options but the same number of options. Using javascript (and jQuery 1.11.1) I need either dropdown to restrict (by disabling, not hiding) the options available in the other dropdown to the next option and below.
I.E:
<select id="dropdown1">
<option value="0">option1_1</option> **
<option value="0">option1_2</option> **
<option value="1">option1_3</option> **DISABLED**
<option value="2">option1_4</option> **DISABLED**
<option value="3">option1_5</option> **DISABLED**
</select>
<select id="dropdown2">
<option value="0">option2_1</option> **DISABLED**
<option value="0">option2_2</option> **DISABLED**
<option value="0">option2_3</option> **
<option value="1">option2_4</option> **
<option value="2">option2_5</option> **
</select>
If option 2 in dropdown1 is selected, options 1 & 2 of dropdown2 are disabled and only the remaining options are available in dropdown2 and the unused options in dropdown1 would also be disabled. Dropdown2 would control dropdown1 in the same way if the initial choice was made in dropdown2.
Any help would be appreciated.