PDA

View Full Version : ComboBox value


gazzer
11-06-2002, 03:16 PM
Good afternoon people,

I have been using the triple comboBox from this site, but I have a question.

When sending the results to another page I can only seem to get Box 1 value, how do I get the entered values of the other two boxes.

========== CODE ==========

<select name="CBN1" size="1" style="font-family: Verdana, Tahoma, Arial; font-size: 12" onChange="ReDirect1(this.options.selectedIndex)">
<option selected>---Select1----------------------------</option>
<option value="Organisations and Management">Organisations and Management</option>
<option value="Home and Community">Home and Community</option>
<option value="Pupil Support">Pupil Support</option>
<option value="Curriculum and Standards">Curriculum and Standards</option>
</select>

<select name="CBN2" size="1" style="font-family: Verdana, Tahoma, Arial; font-size: 12" onChange="ReDirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select2----------------------------</option>
<option value=" " selected>---Select2----------------------------</option>
</select>

<select name="CBN3" size="1" style="font-family: Verdana, Tahoma, Arial; font-size: 12">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------------------</option>
<option value=" " selected>---Select3----------------------------</option>
</select>

========== END CODE =========

The rest of the code is as per example from this web site, but i do not know enough about java to be able to get the entered values of option 2 and 3.

Please help.

Gazzer

rsci
11-06-2002, 04:13 PM
Because of this line:

onChange="ReDirect1(this.options.selectedIndex)">

you will only get that particular value. Without seeing the rest of the script, I would add lines to the function ReDirect1 that gathers the values of all 3 boxes before submitting them.

gazzer
11-07-2002, 07:49 AM
Cheers m8, but like I said I am no expert in java and so would not know where to start with your suggestion.

Would you be able to expand a little further please.

Gazzer