[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-25 Thread Mike Alsup
> 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); >

[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-25 Thread Alexsandro_xpt
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) {

[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-25 Thread Alexsandro_xpt
Very body! I always have used ajaxError events. The problem with ajaxError it's global event. And I never see documentation about $.httpSuccess Now I will try do like you said. Thank you. On 25 out, 10:33, Mike Alsup <[EMAIL PROTECTED]> wrote: > > And If I want handle to catch AjaxError in a

[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-25 Thread Mike Alsup
> 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

[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-24 Thread Alexsandro_xpt
And If I want handle to catch AjaxError in ajaxComplete? Exist a way? On 25 out, 00:01, Mike Alsup <[EMAIL PROTECTED]> wrote: > > It's possible that I could have 2+ ajax actions running on my website > > at the same time, and I'd like to show a 'loading' image for each of > > them. > > > When

[jQuery] Re: Using ajaxStart/Stop for multiple ajax calls

2008-10-24 Thread Mike Alsup
> It's possible that I could have 2+ ajax actions running on my website > at the same time, and I'd like to show a 'loading' image for each of > them. > > When I use ajaxStart/Stop, if one ajax call starts, it shows the > 'loading' image, but if that call doesn't stop before another ajax > call st