I would like to check the iTotalRecords variable returned by the server when I validate the form that my datatable is on. Is this stored in a global variable that I can access?
You can use fnServerData to 'intercept' the data coming back from the server. Something like this: http://datatables.net/examples/server_side/post.html . Rather than just using fnCallback for the success though - you would want to have an anon function which will look at the JSON return, do whatever logic you need, then call fnCallback.
Replies
Allan
Thank you, your suggestion worked:
[code]
...
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
$('#currentAllocations').val(json.iTotalRecords);
fnCallback(json)
});
);
[/code]