This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by Alec Lee: You mean IE6 doesn't support Select.add()?
Yes, it does. But it's weird about how it interprets the 2nd parameter.
For example, if you are trying to add the option to the end of the list, the W3C Specification states that you should pass null. But IE6 requires a zero. Stuff like that.
Joined: Jan 28, 2004
I am looking for a way to insert a new option at the START of the option list. It seems that if I want to directly modify the options array, I can only append an element at the end of it by 'options[options.length]=new Option(..)' or overwrite another option by 'options=sth'. This codes result in typeerror exception:
BTW, where can I find the microsoft's spec on its select.add() method?