JQuery: "Unexpected method call or property access" in IE8

I get this error whenever I click on a specific button in my code and delete the following line, cause the problem to go away and the button works:

$(selector_value_object).html(value_object); 

And both variable objects selector_value and value_object are defined. In fact, this line only works if both variables are defined. So what could be causing this error? IE8 must have .html () support, right?

I am running jQuery version 1.8.3.

Note. This issue only occurs in IE8.

+7
javascript jquery internet-explorer-8
source share
1 answer

Not sure why you are using downvote instead of comments. If there is really a reason for downvoting, please tell me to learn something, and not just repeat the mistake in the future.

As for the solution: the problem was that I tried using html () in the input form field, which does not work in IE8. Using val () instead solved it.

+13
source share

All Articles