IE8 + Jquery ajax call giving parsererror from dJango : for json data which seems valid in Firefox
- by PlanetUnknown
The ajax call works fine in FF.
the data returned is in JSON here is an example from FF firebug -
{"noProfiles": "No profiles have been created, lets start now !"}
When I try to print the error in IE8 (& in compatibility modes as well), it says "parsererror".
But the output seems to be valid JSON.
Here is the ajax function call I'm making.
Any pointers would be great !
$.ajax({
type: "GET",
url: "/get_all_profile_details/",
data: "",
dataType: "json",
beforeSend: function() {alert("before send called");},
success: function(jsonData) {
alert("data received");
},
error: function(xhr, txt, err){
alert("xhr: " + xhr + "\n textStatus: " + txt + "\n errorThrown: " + err);
}
});
The alerts in the error function above give -
xhr:<blank>
textstatus:parsererror
errorThrown: undefined
Any pointers would be great !
Note : jquery : 1.3.2