Log in

View Full Version : Need help with multiple selectbox



peppetto
05-10-2007, 09:16 PM
Hi Guys,
Does anybody can help me with multiple selecbox.
I have this problem I have 2 select boxes with 3 values
example:

<select name="slb1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select name="slb2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
I want to make it when user chooses value 1 in first or second selectbox then value 1 in first or second select box must be disabled you can not choose to same values in both selectboxes
That is the same for value 2 and three.
Thanx in advance

jscheuer1
05-11-2007, 06:10 AM
This type of exclusivity is what radio buttons are designed for. No two radio buttons of the same name may be checked at any given time. It would be difficult if not impossible to arrange this cross browser for select options. In FF and Opera, you can simply disable an option, but not in IE. Even in FF and Opera, care would need to be taken to re-enable a disabled option when a different one was selected in the other select. Radio buttons do all of this sort of thing automatically.