Click to See Complete Forum and Search --> : combo boxes


krl02
10-15-2003, 08:12 AM
I have two combo boxes listing titles on a html page. I want to control the selection between the to boxes. If a selection is made in box A, then any selection previously selected in box b is unselected and vica versa. How do I do this? Is this possible?

pyro
10-15-2003, 08:19 AM
Something like this ought to do it for you...

<form name="form1" method="post" action="">
<p><select name="select_one" onchange="this.form.select_two.selectedIndex='0';">
<option>Please choose</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<select name="select_two" onchange="this.form.select_one.selectedIndex='0';">
<option>Please choose</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select></p>
</form>