The options array for a select cannot be cleared. The code below does not work as expected using Safari 4.01 (5530.18). ----------- <html> <head> <script type="text/javascript"> function load() { var sel = document.getElementById("select"); for (var i = 0; i < 20; i++) { var opt = new Option('option '+i, i, false, false); sel.options[sel.length] = opt; } alert(sel.length); sel.length = 0; alert(sel.length); sel.options.length = 0; alert(sel.options.length); } </script> </head> <body onload="load()"> <select id="select"></select> </body> </html>
Could you please clarify why this bug was marked as INVALID?