[Javascript] IE verses the option element onclick event

Peter Brunone peter at brunone.com
Fri Dec 30 14:34:35 CST 2005


Seems like that would just be

mySelect.options[mySelect.selectedIndex].value

...right?

You can change value to text if you want the visible text of the option...

Cheers,

Peter

 From: "Roderick A. Anderson" raanders at acm.org

I just ran into this interesting non-feature of IE. There is no onclick 
event for an ( it looks like IE 6 and older ).

Being new to serious Javascript'in I haven't found any example code to 
solve it.

My searching found some code that hints at the issue here.

http://www.lattimore.id.au/2005/07/01/select-option-disabled-and-the-javascript-solution/

What I'm trying to do is change an image next to the 'only'  list in the document depending on which is selected.Suggestions of where to look for a QaD answer of how to determine whichwas selected when the onchange event fires for the.

TIA,
Rod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20051230/e72346ea/attachment.htm>


More information about the Javascript mailing list