Jump to content

How do I remove the same select option in all other select boxes?


ds111

Recommended Posts

Hi!

I have 3 select boxes:

 

<select name="select1" id="select1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

<select name="select2" id="select2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

<select name="select3" id="select3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

 

Does anyone know of a way, in Javascript, to delete option "1" in select2 and select3 if it was selected in select1?

 

Then...if I select option "2" in select1, it should return option "1" in select2 and select3, and remove option "2."

 

How can I do this? Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.