So I'm having a crossbrowser javascript issue.
I've got a <select>
dom element that has some descendent <option>
element with selected=true
.
In Firefox, I can just do select_elt.value
to get the value of the selected option, but this seems not to work in IE6 (which I need to support).
I tried to iterate through the select_elt.getElementsByTagName('option')
to find the selected <option>
, which I could do, but option_elt.value
still doesn't give me the value of that option.
So what is the appropriate way to get the value of an option or select element in IE6?
(yes, I know I should switch to jQuery or some other crosssplatform library, and I may yet, but now I'm curious about how this is done at all in IE6)