Dojo ajax calls don't work in IE9 Beta?
-
29-09-2019 - |
문제
It appears that dojo xhr ajax calls don't work in IE9 beta. Has anyone else seen this behavior?
I'm using the following code to make a server-side request and return json back:
dojo.xhrPost({
url: baseUrl + path,
handleAs: 'json',
timeout: 60000,
content: request,
contentType: "application/x-www-form-urlencoded",
load: function(result) { ... },
error: function(error, args) { ... }
});
This code works perfectly in IE7, IE8, Firefox, and Chrome. However in IE9 beta it gives me:
Error: xhr cancelled LOG: debug: Error: xhr cancelled SCRIPT5022: Exception thrown and not caught ?tbUsername=user&tbPassword=pass, line 118 character 1 SCRIPT5022: Exception thrown and not caught ?tbUsername=user&tbPassword=pass, line 118 character 1
Any tips would be greatly appreciated...
해결책
None of the Dojo versions support IE9 so far, not even 1.6.0. A new version, 1.6.1 is in the works that will support IE9.
In the meantime, use the "EmulateIE8" meta tag on your sites to force IE9 into IE8 standards mode.
다른 팁
Looks like Dojo 1.6 dropped the same day as IE9 and contains IE9 support:
http://dojotoolkit.org/reference-guide/releasenotes/1.6.html
Time to upgrade Dojo ...