2007/10/10, Dan G. Switzer, II <[EMAIL PROTECTED]>:
>
> >> Actually if you use the 403 - Forbidden HTTP response status code, then
> >it
> >> should trigger the ajaxError() event:
> >>
> >> http://docs.jquery.com/Ajax/ajaxError#callback
> >>
> >> This means you could really easily add a check to see if the status code
> >is
> >> 403 and then handle things appropriately.
> >>
> >
> >yes, but it's executed *after* a possibly local defined error:
> >callback_function. anyway. in most cases that will do just fine...
>
> It does seem like the global events should fire *before* individual calls,
> that way you could cancel the other events in the queue...
>

really? i think the docs say the other way around.. i like to know how
that could be done - cancel the other events. not for the error
handling (the rule: do not check for 403 in your callback function is
easy) but for the success handling :) i'd like to examine the result
and decide to eventually cancel a html update..

ex. somwhere

$("#content").load("/getdata.php");

gets executed.

somewhere ajaxsuccess is defined:

$().ajaxSuccess(function(evt, request, settings){
   // this function should be called before
   // getdata.php is loaded into #content
   // how can i cancel that loading of content?
    magic.cancel();
 });


-robert

> -Dan
>
>

Reply via email to