0

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?

1
  • 1
    Can you also provide the JavaScript where you bind toggleMainPageOption to the change event, and the snippet of HTML for the element you're trying to update? Commented Feb 8, 2010 at 15:18

1 Answer 1

2

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:

Javascript onchange different in IE and FireFox

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.