Re: [jQuery] Global AJAX handlers

2006-09-25 Thread Jörn Zaefferer
Mike, I agree, right now there is no override mechanism. It would be pretty easy to add one though -- add an optional boolean argument (supressGlobalResponders or something) on the ajax function, and then check its value before invoking the global responders. You could then utilize a global

Re: [jQuery] Global AJAX handlers

2006-09-25 Thread Mike Alsup
Andre, Zörn, Those are both good ideas for overriding the global callbacks. I'd like that capability. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

[jQuery] Global AJAX handlers

2006-09-24 Thread Jörn Zaefferer
Hi folks, which of the following examples of global ajax handlers make more sense and are easier to understand? $(#msg).ajaxSuccess(function(){ $(this).append(liSuccessful Request!/li); }); or $.ajaxSuccess(function(){ $(#msg).append(liSuccessful Request!/li); }); With chaining:

Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Klaus Hartl
Jörn Zaefferer schrieb: Hi folks, which of the following examples of global ajax handlers make more sense and are easier to understand? $(#msg).ajaxSuccess(function(){ $(this).append(liSuccessful Request!/li); }); or $.ajaxSuccess(function(){ $(#msg).append(liSuccessful

Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Brandon Aaron
Well I think global should probably mean global and not attached to anything but the jQuery object. Perhaps sometimes I don't want or need to have an ajaxSuccess method be attached to a DOM node. The only way I think having it like this: $('#msg').ajaxStart(... makes sense is if mutliple global

Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Andre Lewis
I think the global responders should be attached to the jQuery object rather than to a DOM element. That said, it's very useful to be able to override the global responders for individual requests -- as Klaus points out, there are often XHR requests that don't merit the user's attention. AndreOn

Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Mike Alsup
the global responders for individual requests -- as Klaus points out, there are often XHR requests that don't merit the user's attention. You can't really override the global responders. If you declare local handlers they are called in addition to the global methods, not instead of them. Mike