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?
OK, I found the problem:
IE9 was rendering the page in compatibility mode.
I added
as the very first line of the header, and now it works.
Finally I solved this issue.
In my master page, there was a script manager. I replaced it with ToolkitScriptManager which is actually packaged with AjaxControlToolkit 4.0.
Now it works superbly.
Hope this might help someone