I use jQuery to bind the event to the onChange handler as follows:
$("#accounts").change(function() { DoSomething(); });
The problem I encountered is that although everything works fine in Firefox, the event never fires in IE. I know that IE handles the onChange event differently than Firefox, as mentioned here among other places. However, I do not think that this is a problem in this case, since the event never fires even when clicking on other elements on the screen.
Just to make sure there was no problem with my jQuery code, I tried to inject the onChange inline event as follows:
<select id="accounts" onChange="DoSomething();"> <option value="1">Account 1</option> <option value="2">Account 2</option> {omitted remaining 3000 options of list for brevity} </select>
but the event still did not fire, even if it was implemented that way.
Currently, I have changed the code to use the onClick event, since the page has low traffic and the function being called is quite inexpensive. However, I would like to find out what the problem is, as I am sure that in the future I will face it again.
source share