Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE 9 Script error SCRIPT438: Object doesn't support property or method 'addEventListener'

I have a jQuery popup window that works in Firefox.

However, I am getting the following error message on line 1 of my html page:

SCRIPT438: Object doesn't support property or method 'addEventListener' popup_1.html, line 1 character 1

The only code I have in line 1 is:

<html>

When I run the IE9 debugger, I am getting an error on something called

script block(1)

But I am not using any javascript named "script block" is this an Internet Explorer add on or something?

like image 423
redconservatory Avatar asked Nov 21 '11 21:11

redconservatory


3 Answers

Looks like I had to add the html 5 doctype:

<!DOCTYPE html>
like image 153
redconservatory Avatar answered Oct 24 '22 08:10

redconservatory


I got this error in IE10. The issue was the browser was running in compatibillity mode. Hit F12 and turn it off. The error is gone.

enter image description here

like image 6
P.Brian.Mackey Avatar answered Oct 24 '22 08:10

P.Brian.Mackey


Adding the following tag solved this issue for me:

<meta http-equiv="X-UA-Compatible" content="IE=Edge">

This error usually happens because IE creates JS variables for every HTML node and it conflicts with jQuery & other JS things you're adding.

like image 5
Ziassan Avatar answered Oct 24 '22 06:10

Ziassan