javascript_howto thread: Subject: RE: Adding and deleting options from select box on load
Hi Chris,
You might try DHTML instructions:
myElement=document.createElement("option"); instead of myElement = new
Option(...);
*****
with (mySelect)
{
while (children.length>0){
myElement=lastChild; // or children.item(0);
removeChild(myElement);
}
}
instead of mySelect.optiond[0]=null;
*******
and
mySelect.appendChild(myElement); instead of mySelects.options[optionElem]
= myElement;
****
Please keep me informed of your experience because removing and adding
options seems to function erraticly.
My program sometimes works perfectly, at other times produces an unnamed
error to transmit to Microsoft and instructs me to restart the computer if
the phenomena repeats itself!!!
Good luck,
Louis