I have the following ajax call which works perfectly in Firefox and Chrome but not IE:
function getAJAXdates( startDate, numberOfNights, opts ) {
var mo
What version of jQuery are you using?
If you check jquery's code, parsererror is thrown when jQuery.httpData() is called. Here's the code from jquery:
if ( status === "success" ) {
// Watch for, and catch, XML document parse errors
try {
// process the data (runs the xml through httpData regardless of callback)
data = jQuery.httpData( xhr, s.dataType, s );
} catch(err) {
status = "parsererror";
errMsg = err;
}
}
Maybe jQuery.httpData() is worth looking at. That is, you can check if jQuery.parseJSON is called and if it indeed returns an object.
if ( typeof data === "string" ) {
// Get the JavaScript object, if JSON is used.
if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
console.log(data); //add this
data = jQuery.parseJSON( data );
console.log("data parsed successfully"); //add this