tags:

views:

197

answers:

1

I have a dropdown box (Combobox). Everytime I make a new selection a table element must show or hide depending on my selection. Now my problem is it's working in Firefox but not in IE. The dropdown has an onchange event which calls the JS function below. The tr element has the ID #mainItem.

function toggleMainPageOption(){
                $("#mainItem").toggle();
}

Why does this not work in IE? Am I doing something wrong?

+2  A: 

The onchange event is triggered when the focus is no longer on the dropdown control (so after you press "TAB" or click somewhere else)

More info here:

http://stackoverflow.com/questions/2058249/javascript-onchange-different-in-ie-and-firefox

Philippe Leybaert