Helj
07-18-2003, 10:10 AM
I have a pulldown like so:
<select name="sel">
<option value="1">AAA</option>
<option value="12">BBB</option>
<option value="34">CCC</option>
</select>
I know how to use frmMain.sel.selectedIndex = 1; etc, but what if I was given a string 'AAA' and wanted to select that item in the pulldown?
I'm sure its something nested like:
frmMain.sel.selectedIndex = frmMain.sel.selectedIndex(indexof('AAA')); or something along those lines, just not sure of the syntax.
Thanks!
Helj
<select name="sel">
<option value="1">AAA</option>
<option value="12">BBB</option>
<option value="34">CCC</option>
</select>
I know how to use frmMain.sel.selectedIndex = 1; etc, but what if I was given a string 'AAA' and wanted to select that item in the pulldown?
I'm sure its something nested like:
frmMain.sel.selectedIndex = frmMain.sel.selectedIndex(indexof('AAA')); or something along those lines, just not sure of the syntax.
Thanks!
Helj