You can use fnServerData to add your one function to get data from the server (typically using $.ajax()). Here is a an example: http://datatables.net/examples/server_side/post.html , it just needs an 'error' hander added.
I did this because the web server response is HTML and i want to see the error in the current document. But i see that inspecting the dom, that the responseText is putted on the html node with an empty head and body tag.
You need to change the selector you are giving to jQuery as it is currently writing the the 'html' element in the DOM. Perhaps something like $('div:eq(0)')... although the exact answer will depend on what you want.
I think the code i posted before will be ok.
I'd like to substitute all the document from ... to ... to use all CSS, ...
the web-server give in the case of error (So Tomcat gice his default message, IIS too, and so on).
Thank you anyway, I think i'm off-thread right now.
Replies
Allan
[code]
jQuery.ajax( {
"dataType": 'json',
"type": "GET",
"url": sSource,
"data": aoData,
"success": fnCallback,
"error": function(XMLHttpRequest, textStatus, errorThrown) {
jQuery('html').html(XMLHttpRequest.responseText);
}
});
[/code]
I did this because the web server response is HTML and i want to see the error in the current document. But i see that inspecting the dom, that the responseText is putted on the html node with an empty head and body tag.
How can i fix this ?
Allan
I'd like to substitute all the document from ... to ... to use all CSS, ...
the web-server give in the case of error (So Tomcat gice his default message, IIS too, and so on).
Thank you anyway, I think i'm off-thread right now.