I have two Selectbox groups. When the user selects an item from the 1st Selectbox group; According to the selected Value, I want to disable some of the items in the 2nd Selectbox group.
Below is my sample code. The example scenario I want to do based on the following set of code is as follows:
<select name="group1" id="group1">
<option value="12">Opt 1</option>
<option value="13">Opt 2</option>
<option value="21">Opt 3</option>
<option value="22">Opt 4</option>
<option value="24">Opt 5</option>
<option value="35">Opt 6</option>
<option value="57">Opt 7</option>
<option value="62">Opt 8</option>
</select>
<select name="group2" id="group2">
<option value="12">Opt 1</option>
<option value="13">Opt 2</option>
<option value="21">Opt 3</option>
<option value="22">Opt 4</option>
<option value="24">Opt 5</option>
<option value="35">Opt 6</option>
<option value="57">Opt 7</option>
<option value="62">Opt 8</option>
</select>
For example: If the user selects <option value="22">Opt 4</option>
from the 1st Selectbox,
In Selectbox 2. group this option items should automatically become "disabled" in the group:
<option value="12">Opt 1</option>
<option value="13">Opt 2</option>
<option value="21">Opt 3</option>
<option value="22">Opt 4</option>
So what I want to do is as follows: According to the value values in the Selectbox, after each item selection, it should be able to select larger values of the current selection in the other Selectbox step.