AJAX problem on Mozilla Firefox 31x and 32x, Sychronous XMLHttpRequest is deprecated.
I have an adding form that allows to upload also a file, here's my code:
$("#frm_add").on("submit",function(e)
{
var formObj = $(this);
var formURL = formObj.attr("action");
var formData = new FormData(this);
var addnew = $.ajax({
url: formURL,
type: 'POST',
data: formData,
mimeType:"multipart/form-data",
contentType: false,
cache: false,
processData:false
})
addnew.done( function(data, textStatus, jqXHR)
{
if(data == "Saved")
{
$("#msgid").empty().removeClass().addClass("msgid-ok").append("Record Successfuly Save").fadeIn("slow").fadeOut(6000); if ( console && console.log ) {console.log(data);}
$("#contentdata").load("phps/list.php");
txtClear();
}
else if(data == "NS")
{
$("#msgid").empty().removeClass().addClass("msgid-ok").append("No Record Save").fadeIn("slow").fadeOut(6000); if ( console && console.log ) {console.log(data);}
}
else
{
$("#msgid").empty().removeClass().addClass("msgid-err").append("Saving Record Failed <br>" + data).fadeIn("slow").fadeOut(6000); if ( console && console.log ) {console.log(data);}
}
})
addnew.fail( function(jqXHR, textStatus, errorThrown)
{
$("#msgid").empty().removeClass().addClass("msgid-err").append("Server Error #ADDGENERR").focus().fadeIn("slow").fadeOut(6000); if ( console && console.log ) {console.log(jqXHR + textStatus);}
})
e.preventDefault();
});
But I got no response instead this is what on my console:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help
http://xhr.spec.whatwg.org/
Can anyone help me to figure this out? I'm willing to give all my web page code including the PHP file.