[Javascript] IE verses the option element onclick event

Roger Roelofs rer at datacompusa.com
Fri Dec 30 12:52:04 CST 2005


Roderick,

On Dec 29, 2005, at 11:37 AM, Roderick A. Anderson wrote:

> I just ran into this interesting non-feature of IE.  There is no  
> onclick event for an <option /> ( 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'  
> <select /> list in the document depending on which <option /> is  
> selected.
>
> Suggestions of where to look for a QaD answer of how to determine  
> which <option /> was selected when the onchange event fires for the  
> <select />.

I don't have a url for you, but I would use an ondatachange or onblur  
event on the select rather than on one of the options.

Roger
-------------------------------------------------------
Roger Roelofs                          web   www.datacompusa.com
Datacomp Appraisal Services   Email rer at datacompusa.com
3215 Eaglecrest Drive, NE
Grand Rapids, MI  49525-4593





More information about the Javascript mailing list