I just learned something interesting. The add method for the javascript select object in IE 6 takes only one parameter. It throws an error when you pass it two parameters which I believe is the standard, even as documented on the MSDN site.
My question is this. What is your best-practice recommendation for programmatically adding option elements to a select element in javascript?
- Call the add method differently based on the value of the user agent?
- Wrap the select object in a class that provides the proper method signature?
- Use a javascript library which does this for you (specify which library)?