IE 6 and below: Adding select element using createElement
Whilst working on a project, I've encountered a bug that i'd like to clean up.
In IE6 and below, when using createElement and appendChild to add a new select element to the page, it automatically selects the first option.
the page relies on using the onchange event of the select element, and if there is only one option and it is selected, there is no possible way to fire the onchange event.
To get around this, i've had to use innerHTML to build the select element, which I feel is dirty :eek: so I want to clean it up.
Any idea's? I have already tried setting each option's selected value to false, etc but nothing other than using innerHTML seems to of worked,.