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: wdlists at triche-osborne.com (Triche Osborne)
  • Subject: [Javascript] IE verses the option element onclick event
  • Date: Fri Dec 30 21:43:28 2005

Roderick A. Anderson wrote:
> 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 />.
> 

Q&D would be something like this:

<select onchange="myFunction(this.options[this.selectedIndex].value);">

The more modern approach would be to attach the event through 
window.onload, but either will work. It's a matter of how much 
separation you prefer.

Triche