onClick behaviour doesn't work with Internet Explorer when used alonside drop down boxes

DReade83 used Ask the Experts™
This is really bugging me, Firefox works fine but for some reason if I insert the onClick behaviour into a drop down box option, and select the option in Internet Explorer, it doesn't work. I've used radio buttons to see if it was a code issue, but they work with the onClick behaviour no problem.

Any ideas? Thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

on IE you cant put onclick on option element, only select element can listen events, if your attempt is to get the value selected, you can put onchange="valueChanged(this)" at your select element, and use the follow function at JavaScript:

function valueChanged(selectField) {
    var value = selectField.options[selectField.selectedIndex].value;
     alert(" the value is "+value);
David S.Consultant & Challenge Subduer
Top Expert 2009

cwichoski gave a good answer to the question. I see no reason to delete this.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial