0

This link has the code: http://jsfiddle.net/agc0fuyk/18/

works fine when :

Run in jsfiddle (chrome as well as IE 11.0.96).

Run in visual studio asp.net html page (chrome as well as IE 11.0.96).

fails when :

Run in SharePoint 2010 Visual Web Part(visual studio 2010)

now when I open F12 Developer tool's emulation tab for this IE window, Document mode is set to 5 by default, When I change the document mode to 10, I can see the page/chart loaded properly.

At sharepoint page I have added the meta tag :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

also added JavaScript to remove indexOf error in IE Reference from indexOf is not a function in Firefox, Opera but works in IE, indexOf alternative in javascript to test string contains?

Please help me to run this in IE.

Community
  • 1
  • 1
bshri bakore
  • 21
  • 1
  • 5

2 Answers2

1

Got the solution to this problem by adding following lines in "Page_Load" of Web-Part:

HtmlMeta metaEdgeIE = new HtmlMeta();
metaEdgeIE.HttpEquiv = "X-UA-Compatible";
metaEdgeIE.Content = "IE=EDGE";
Page.Header.Controls.AddAt(0, metaEdgeIE);

Now its working well in IE 11.

bshri bakore
  • 21
  • 1
  • 5
0

This may be a doctype issue.

Force IE10 standards mode:

<!DOCTYPE html> 

Try to insert that at the top your HTML.

More info on document compatibility

Chris Malherbe
  • 238
  • 2
  • 9