I works only in IE and I use:
newOpt = document.createElement("option");
newOpt.text="This is the new option text"
newOpt.value="newOptionValue"
document.formName.SelectName.options.add(newOpt,2) ;
2 is the location of added option on the select.
<select name="SelectName">
<option value="0" selected>Configuration file</option>
<option value="1" selected>Test file</option>
</select>
Good luck,
Yaron
On Wed, 15 Oct 2003 15:15:20 +0000 (UTC), "Cristian Martinello"
<ca*********@tiscali.it> wrote:
How can I add <OPTION> to a tag <SELECT> runtime ?
the code combo.innerHTML+="<OPTION value='1'>Name</OPTION>" doesn't
work...