Ganeshji, I you want control over ajax error handling you can just redefine the jQuery.httpSuccess function. That fn simply returns a boolean. It is currently implemented as follows:
httpSuccess: function( r ) { try { return !r.status && location.protocol == "file:" || ( r.status >= 200 && r.status < 300 ) || r.status == 304 || jQuery.browser.safari && r.status == undefined; } catch(e){} return false; } Mike On 8/8/07, Ganeshji Marwaha <[EMAIL PROTECTED]> wrote: > I didnt find much use for these right now, but i am sure, the day won't be > far when this will save my day... > > I am more interested in a plugin (or in the core itself) that will allow me > to tell jquery what an "error" as it applies to ajax. > At present, i guess that it is hard-coded within, which is not much useful > for handling application specific errors. And i think the error handler is > the cleanest place to handle app specific errors. > > Just so you know mootools has this feature. > > -GTG > > > On 8/7/07, John Resig <[EMAIL PROTECTED]> wrote: > > > > In the source of the URL that I linked to. I also just added it to the > > main contents, to make it easier to access. > > > > --John > > > > On 8/7/07, Christopher Jordan <[EMAIL PROTECTED]> wrote: > > > Those sound really useful! Where can we get the code? > > > > > > Cheers, > > > Chris > > > > > > > > > On 8/7/07, John Resig <[EMAIL PROTECTED] > wrote: > > > > > > > > Hey everyone - > > > > > > > > So Mike Hostetler was telling me about some Ajax queueing plugins that > > > > he wanted to write - so I got some ideas, and less than an hour later > > > > - here are two new Ajax queueing plugins for you to enjoy! > > > > > > > > Lame demo: > > > > http://dev.jquery.com/~john/plugins/ajaxqueue/ > > > > > > > > About the plugins: > > > > > > > > * Queued Ajax requests. A new Ajax request won't be started until the > > > > previous queued request has finished. > > > > > > > > Example: > > > > jQuery.ajaxQueue({ > > > > url: " test.php", > > > > success: function(html){ jQuery("ul").append(html); } > > > > }); > > > > > > > > * Synced Ajax requests. The Ajax request will happen as soon as you > > > > call this method, but the callbacks (success/error/complete) won't > > > > fire until all previous synced requests have been completed. > > > > > > > > Example: > > > > jQuery.ajaxSync({ > > > > url: "test.php", > > > > success: function(html){ > > > > jQuery("ul").append("<b>"+html+"</b>"); } > > > > }); > > > > > > > > Both have their uses, but ajaxSync, in particular, seems quite useful. > > > > Let me know what you think. If this code helps you out, let me know, > > > > and I'll throw it up somewhere. > > > > > > > > --John > > > > > > > > > > > > > > > > -- > > > http://cjordan.us > > > >