Hi everybody,
  while I was writing my heavy-ajax-loaded app I noticed that while I
can subscribe to local ajaxError events 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 global ajaxError, 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?

Reply via email to