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 server into the page and 
instead use some nicer message...?

I thought of using the success handler for rendering, but the parameter 
passed to this function is the XmlHttpRequest object and not the 
response body.

Using $.httpData like

success: function(xhr) {
     $('#somewhere').html( $.httpData(xhr) );
}

works, but is this the intended way to do it?


-- Klaus

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to