Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  28] [ 6]  / answers: 1 / hits: 28909  / 11 Years ago, wed, may 29, 2013, 12:00:00

My problem



I'm trying to put a map on a webpage, the data being fetch with Ajax. It works fine with all browsers, but not IE9.



I get an error:




SCRIPT5007: Unable to get value of the property 'ajax': object is null or undefined




and the map does not load.



The code



       var mapModel = new Map(); 

mapModel.get(leads).fetch({success: function(){ //error on this line
var mapView = new MapView({ model: mapModel });
$('body').append(mapView.el);
mapView.render();
}});


What I tried



This seems to be a very common issue, here is the most up-voted question on the subject. So I tried to put



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


but it didn't solve anything.



My question



What I should I do to fix this problem?


More From » ajax

 Answers
5

OK, I found the problem:



IE9 was rendering the page in compatibility mode.



I added



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


as the very first line of the header, and now it works.


[#77947] Tuesday, May 28, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makaylahk

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;