I have a web page that makes an AJAX call to the server to update some database tables. In Internet Explorer, everything goes in without a problem. But when you use the page in Firefox and make the AJAX call, the call goes through and updates the database tables, but instead of going into the success portion of the call, it goes to the error.
The error returned is result.status is 0 and result.statusText is undefined. Anybody have any clue why this is happening? I'm assuming it's an XMLHttpRequest status 0 error, but I have no idea why I'm getting it for Firefox and not IE.
Here's the relevant code:
var json = JSON.stringify(data0);
$.ajax({
type: "POST",
url: modelhost + "/SaveAnswer",
async: false,
data: json,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function() {
window.location.href = url;
}
});
function error(result) {
alert('Error: ' + result.status + ' ' + result.statusText);
}