M
mr_burns
hi,
using javascript, how do i select an option in a combo box? i have
tried looking on the internet but dont really know what i should be
searching for. what i want to happen is that when a function is called
a line of code will select a specific option in a combo box. something
like:
//excuse the dodgy syntax
function select_combo() {
cb_1.select[3] //where option 3 will be selected (or 4 if first index
is 0)
}
the combo box would be something like:
<select>
<option>First</option>
<option>Second</option>
<option>Third</option>
</select>
The function would change the selection in the combo box. any ideas
for the function code? cheers
burnsy
using javascript, how do i select an option in a combo box? i have
tried looking on the internet but dont really know what i should be
searching for. what i want to happen is that when a function is called
a line of code will select a specific option in a combo box. something
like:
//excuse the dodgy syntax
function select_combo() {
cb_1.select[3] //where option 3 will be selected (or 4 if first index
is 0)
}
the combo box would be something like:
<select>
<option>First</option>
<option>Second</option>
<option>Third</option>
</select>
The function would change the selection in the combo box. any ideas
for the function code? cheers
burnsy