Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] IE verses the option element onclick event


  • From: raanders at acm.org (Roderick A. Anderson)
  • Subject: [Javascript] IE verses the option element onclick event
  • Date: Sat Dec 31 08:37:42 2005

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 ).

And one more post to my own.  Seems my first post got hung and didn't 
make it through until yesterday.

Thanks to all that offered suggestions.  My solution ( as most suggested 
) was to use an onchange in the <select />.

There was several other layers of complexity but this got me going in 
the right direction.  Not mentioned in my first post was there are two 
radio buttons and all three: the select, and both radio buttons; are 
mutually exclusive.  Only an option, radio_1, or radio_2 can be selected 
at once.
    This is on a test/development server right now and even when it goes 
live access is for customers only so I can't show it off.  :-(
    I will try to put a mockup of it in a publicly accessable area in 
case other novices need the same functionality and/or the experts can 
rip into it and cleanup the code.


Again thanks,
Rod
-- 


> 
> 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 />.
> 
> 
> TIA,
> Rod