I have a little challenge. I saved somethings to my MongoDB and I want to render them with a select tag. The situation is, I want what is selected in the first option to determine what can be selected in the second option, how do I go about it?
<select name="1" id="">
<option value="">A</option>
<option value="">B</option>
<option value="">C</option>
</select>
if option A is selected in 1, 2 should have only the option of
<select name="2" id="">
<option value="">D</option>
<option value="">E</option>
<option value="">F</option>
</select>
if option B is selected in 1, 2 should have only the option of
<select name="2" id="">
<option value="">G</option>
<option value="">H</option>
<option value="">I</option>
</select>
if option C is selected in 1, 2 should have only the option of
<select name="2" id="">
<option value="">J</option>
<option value="">K</option>
<option value="">L</option>
</select>