Posted by: doxaras on: November 5, 2009
Some ie6 bug prevent from properly clearing the options of a select html element. This is an issue the actual length that myselect.options.length statement returns. The smart way to do this is with a while loop.
function removeSelects(elementId){
var myselect = document.getElementById(elementId);
for(var i=0; i<myselect.options.length; i++){
myselect.options[i] = null;
}
while (myselect.options.length > 0) {
myselect.options[0] = null;
}
}
