Select to view content in your preferred language

Require undefined in IE

14191
7
Jump to solution
01-20-2015 11:31 AM
BrentHoskisson
Frequent Contributor

Only in Internet Explorer, I get

0x800a1391 - JavaScript runtime error: 'require' is undefined

when my page starts up.  It continues to run fine in any other browser.  Any clue what the issue is?

Thanks.

Update:  It seems that the ESRI samples don't work for me in IE either.  Is there something wrong with js.ArcGIS.com?

0 Kudos
1 Solution

Accepted Solutions
BrentHoskisson
Frequent Contributor

Here is the more correct answer.

Add this to the head section.

<meta http-equiv="X-UA-Compatible" content="IE=11, IE=10, IE=9, ie=8, ie=7">

View solution in original post

7 Replies
JeffJacobson
Frequent Contributor

What version of IE?

0 Kudos
BrentHoskisson
Frequent Contributor

Version 11.

0 Kudos
KellyHutchins
Esri Frequent Contributor

I ran a quick test using the samples in the JSAPI help and they run just fine using IE11. Can you provide more details? Is the issue only with your code? If so can you provide a simple example that will allow us to reproduce the issue.

0 Kudos
BrentHoskisson
Frequent Contributor

What finally worked was simply copying the ArcGIS init.js file locally and running it.  I guess I can't access the http://js.arcgis.com/3.12 directly.

Update: Actually, even better I added init.js to the link as so.  And now it works, too.

<script src="http://js.arcgis.com/3.12/init.js"></script>

Thanks

0 Kudos
BrentHoskisson
Frequent Contributor

Here is the more correct answer.

Add this to the head section.

<meta http-equiv="X-UA-Compatible" content="IE=11, IE=10, IE=9, ie=8, ie=7">

JeffJacobson
Frequent Contributor

Have you tried using IE 11 from a different location? E.g., if you're seeing the error at work, try accessing the same page at home and see if you get the same error.

0 Kudos
FionaRenton
Deactivated User

I don't know why the require part isn't working, but IE11 has it's own "extra security", so won't by default allow you to open a local drive .html file.

If you open the ESRI samples in the sandbox, or copy them to a server they work fine in IE11.

0 Kudos