1
votes

Hello all i'm working with morris.js graphs. The graph is displayed in Chrome but it is not working in IE 10. Here is the JS error i get

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/6.0; .NET4.0E; .NET4.0C; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; AskTbCPUID/5.17.1.28235) Timestamp: Sat, 13 Apr 2013 13:46:23 UTC

Message: 'Raphael' is undefined Line: 87 Char: 7 Code: 0 URI: http://***//morris.js

1
I notice that your IE10 is identifying itself as IE7. This means it's using compatibility mode, so you're not getting any of the newer IE10 features. Rahpael (and Morris) should work fine in IE7, but if you weren't intending to be in compatibility mode, you should probably try to correct this before moving on to solving the underlying problem.Spudley
Secondly, you should try using IE's developer tools features to help you solve the problem. Press F12 to open dev tools window; then reload your page. Look at the network activity tab to see if there are any loading errors, and also to see the order that the script files are being loaded. This should give you some clues about why you're getting the problem. You may find that it can be solved simply by putting your code into a $(document).ready() function. (note, I've posted this as a comment rather than an answer because without actually seeing it happen, I can't give a certain answer.Spudley
Could you somehow share a scaled down code in your question?Shamasis Bhattacharya

1 Answers

3
votes

add this as first line of HTML

<!DOCTYPE HTML>

and this to <head></head> section:

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

It will prevent IE from switching to older (IE7-8) versions.