This will work?
$.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
},
complete: function(XMLHttpRequest, textStatus) {
var success = $.httpSuccess(XMLHttpRequest);
if (!success) {
// do something
}
},
});
On 25 out, 10:33, Mike Alsup <[EMAIL PROTECTED]> wrote:
> > And If I want handle to catch AjaxError in ajaxComplete?
>
> > Exist a way?
>
> You can still use ajaxError to trap errors. Also, the XHR object is
> passed to ajaxComplete callback as the 2nd arg so you can test for
> success like this:
>
> $().ajaxComplete(function(event, xhr, settings) {
> var success = $.httpSuccess(xhr);
> if (!success) {
> // do something
> }
>
> });