javascript - jQuery.ajax() error with textStatus=error -
the jquery.ajax()
function use works correctly of time. not returning data. instead error()
function called.
$.ajax({ [...] , error: function(jqxhr, textstatus, errorthrown) { console.log(jqxhr); console.log(textstatus); console.log(errorthrown); } });
i can see in there in cases textstatus
'error'
, errorthrown
''
(empty).
the jquery documentation lists possible values of textstatus
("timeout"
, "error"
, "abort"
, , "parsererror"
). not describe, 'error'
means.
jqxhr
returns object not seam reveal additional insights.
how can investigate source issue is?
found out happens, whenever reload pressed in browser, while ajax request still running.
this post helped me implement solution.
Comments
Post a Comment