Entry
How do I delete one Option in select box in IE ?
Jan 9th, 2002 21:48
Suban Asif, Guest, Suban Asif
Set the option which you want to delete to 'null'.For example, you
have a form with name 'frmTest' and a Combo box as 'cboTest'.If you
want third option of this selection box to be removed, then wirte
following:
<SCRIPT language="JavaScript">
document.frmTest.cboTest.options[2] = null;
</SCRIPT>
<FORM name="frmTest">
<SELECT name="cboTest">
<OPTION value="1">Option 1
<OPTION value="2">Option 2
<OPTION value="3">Option 3
<OPTION value="4">Option 4
</SELECT>
</FORM>