Re: [jQuery] $.ajax with success, error and complete

2006-09-09 Thread Klaus Hartl
John Resig schrieb: if ( success ) success( jQuery.httpData(xml,type), status ); instead of if ( success ) success( xml, status ); I cannot see the use for the XHR object itself in the callback... I made that change for the success() method last night, however I held of on making the

Re: [jQuery] $.ajax with success, error and complete

2006-09-09 Thread John Resig
Hey John, I think, having the response body for the success handler is sufficient, because this is the only case, where one wants to use it anyway... Ok, that was my exact line of thinking too, good. --John ___ jQuery mailing list

[jQuery] $.ajax with success, error and complete

2006-09-08 Thread Klaus Hartl
Hi, I am using $.ajax and have defined handlers for success, error and complete. The complete handler handles the response body, which is simply html I want to render into the page. Question: The complete handler is also fired after error. How can I prevent to render a 404 message from the

Re: [jQuery] $.ajax with success, error and complete

2006-09-08 Thread Mike Alsup
Klaus, Both success and complete are passed a 2nd arg which indicates the status of the request: 'success', 'error', or 'notmodified'. Mike Question: The complete handler is also fired after error. How can I prevent to render a 404 message from the server into the page and instead use some

Re: [jQuery] $.ajax with success, error and complete

2006-09-08 Thread Klaus Hartl
Mike Alsup schrieb: Klaus, Both success and complete are passed a 2nd arg which indicates the status of the request: 'success', 'error', or 'notmodified'. Wouldn't it be better if the response text is passed to these functions, similiar to $.get and $.post? Like: if ( success ) success(

Re: [jQuery] $.ajax with success, error and complete

2006-09-08 Thread John Resig
if ( success ) success( jQuery.httpData(xml,type), status ); instead of if ( success ) success( xml, status ); I cannot see the use for the XHR object itself in the callback... I made that change for the success() method last night, however I held of on making the same change for