When using firefox, an ajax post request i have is being reported as aborted in firebug. The ajax post works fine in IE and Chrome. It is not a cross domain request. I tr
I would start by explicitly setting (and changing) some of the basic ajax options:
cache: false,
timeout: 60000,
async: false
Check the maximum post size setting on your server.
Try only
async: false
in ajax option, I had the same problem.
If you send this AJAX request from an event handler (example : click of a submit button), be sure to prevent the browser's default behavior (submitting the form), until you'll have 2 HTTP requests fired, with the first being aborted.
You can use e.preventDefault()
to achieve this.
I just had this trouble on IE8.
This is either a cross domain issue or it is an issue with Firefox aborting your request because request is async. For cross domain you can check the origin of your request and what is allowed on webservice. You might have to read up on CORS.
If it is not cross domain then it is certainly a problem with request being async. Just change it to sync.
What type of content your server returning. JSON or HTML content. Are you using charset=utf-8 in server content. Make sure your server response must be in JSON contentType. Another guess remove datatype: "html" from your code. Try for your luck.
If your server returns json means, try below
$.ajax({
type: 'POST',
url: '/Save',
data: JSON.stringify(dataset),
datatype: "json",
contentType: "application/json",
success: function (data, textStatus, jqXHR) {
//alert("success");
},
error: function (jqXHR, textStatus, errorThrown) {
//alert("error");
}
});
datatype: "json", contentType: "application/json" makes sense