ShMiL
06-24-2003, 04:24 PM
I have two <selects>'s:
<select name="AAA1">
<option>Choose...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<select name="BBB1" style="display:none;">
<option>Choose...</option>
<option>1</option>
<option>2</option>
</select>
What I'm trying to do is to run a function which will do this:
1. When user chooses something from AAA1, the BBB1 select box will become visible.
2. When user chooses something from BBB1, the AAA2 select box will become visible (there are 4 sets of select boxes from 1-4 just like the code above).
But the trick is: AAA2, will show only three options (not 4, like AAA1), not showing the option selected at AAA1.
3. After selecting something from AAA2, BBB2 will become visible, showing option 1 and 2, just like BBB1.
4. After selecting something from BBB2, AAA3 will become visible, but only with two options (not showing options chosen at AAA1 and AAA2).
5. And so on...
The <select>'s are to be sent with a form, and not only visible to users - so the values should really be there...
I tried to do it manually but had no luck... anyone can think about something automatic?
Thanks for any help!
:confused:
<select name="AAA1">
<option>Choose...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<select name="BBB1" style="display:none;">
<option>Choose...</option>
<option>1</option>
<option>2</option>
</select>
What I'm trying to do is to run a function which will do this:
1. When user chooses something from AAA1, the BBB1 select box will become visible.
2. When user chooses something from BBB1, the AAA2 select box will become visible (there are 4 sets of select boxes from 1-4 just like the code above).
But the trick is: AAA2, will show only three options (not 4, like AAA1), not showing the option selected at AAA1.
3. After selecting something from AAA2, BBB2 will become visible, showing option 1 and 2, just like BBB1.
4. After selecting something from BBB2, AAA3 will become visible, but only with two options (not showing options chosen at AAA1 and AAA2).
5. And so on...
The <select>'s are to be sent with a form, and not only visible to users - so the values should really be there...
I tried to do it manually but had no luck... anyone can think about something automatic?
Thanks for any help!
:confused: