Could someone please give me a clue as to why the following code does not work under MSIE?
<html>
<body>
<select id="si">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
</select>
<script type="text/javascript">
var e=document.getElementById("si");
e.size=3;
e[0].style.display="none"; // <-------- no effect
</script>
</body>
</html>
IE doesn’t allow you to manipulate
optionelements directly. In my experience, you need to remove all of theoptionelements from theselectand repopulate them with whatever changes you want to make already applied (in this case, one element removed).