I ended up setting up a local ajaxError callback that puts the "textStatus" property to the settings object:
'error': function(request, textStatus) { this.textStatus = textStatus; }, this way allows me to use that property into the global ajaxError callback. I will investigate further on this issue (and decide if this is an issue in first place :D) Ciao! On 4 Mar, 15:58, ".png" <willywo...@gmail.com> wrote: > Hi everybody, > while I was writing my heavy-ajax-loaded app I noticed that while I > can subscribe to localajaxErrorevents simply by specifing this > within my $.ajax() settings object: > 'error': function (XMLHttpRequest, textStatus, errorThrown) { > // typically only one of textStatus or errorThrown > // will have info > this; // the options for this ajax request} > > (http://docs.jquery.com/Ajax/jQuery.ajax#options) > > I can't do quite the same with a globalajaxError, altought the > documentation says: > > ajaxError(Global Event) > This global event behaves the same as the local error event. > (http://docs.jquery.com/Ajax_Events) > > but: > function (event, XMLHttpRequest, ajaxOptions, thrownError) { > // thrownError only passed if an error was caught > this; // dom element listening} > > (http://docs.jquery.com/Ajax/ajaxError#callback) > Please notice the different parameters between local and global event. > > My problem is I relied on textStatus that's missing from the global > event callback's parameters to catch json parser errors: > if (textStatus == 'parsererror') alert('Gotta problem'); > > I can't find anything on this group referring to this problem; have > you ever run into this?