I think the general use for attaching the global event handlers to a
DOM element is so that you can attach it directly to the element on
your page where you want your error or success messages to go, and
could therefore use $(this).html("message about stuff"); inside you're
handler.  If you don't want to use this, then I'm sure attaching to
document would be fine, though I haven't used it in that way.

Paul

On 11/22/06, Dave Methvin <[EMAIL PROTECTED]> wrote:
> I want to catch the global ajaxError event rather than having to deal with
> it on each ajax call. However, I don't really need to attach it to any
> particular element--it's a global handler, after all. So is the general
> wisdom to just attach it to window or document?
>
> Also, none of the global events are passed information on the request that
> caused the error, which makes it difficult to report any details on the
> problem. It would be handy if they got the request or at least the error
> code.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to