Firefox aborting some ajax request -
i using firefox 20.0.1 version.
firefox shows status aborted request. if refresh again not show aborted status.
my code:
for (index in personscorecollection.collection) { // scores(2nd, 3rd, 4th , 5th scores) $.when( variableset(collectionobject, index), endorsementrankforeachperson(index), usabilityscore(index), userconnection(index), usersearch(index) ).done(); }
inside function calling ajax request.
my ajax request code
var xdr; if (window.xdomainrequest) // check whether browser supports xdr. { xdr = new xdomainrequest(); // create new xdr object. if (xdr) { xdr.open("post", urlsearch); xdr.timeout = 3000;//set timeout time 3 second. xdr.onload = function () { try{ //success method } catch (err) { //error method } }; xdr.onprogress = function () { }; xdr.onerror = function () { //error method }; xdr.ontimeout = function () { //error method }; xdr.send(); } } else { $.ajax({ url: urlsearch, type: 'post', datatype: 'json', timeout: 3000, success: function (data) { //success method }, error: function () { //error method } }); }
my problem ajax request aborted in firefox (but works fine in other browsers). if refresh again showing result.
please me solve issue.
thanks in advance.
Comments
Post a Comment