Solution::for Ajax autoload

Solution::for Ajax autoload

t0mt0m Posts: 5Questions: 0Answers: 0
edited April 2013 in DataTables 1.9
Hello,

I solved the problem with ajax autoload by applying this 'hack'.

[code]
$(document).ready( function() {
$(window).bind('focus', function() {
oTable.fnFilter('',0);
});
});
[/code]

Now when user triggers 'focus' event on 'window', DataTables trying to perform an empty search which leads to AJAX autoload and displaying the data.
In my case I have search enabled for every column in a table, '0' is very first column.
In case you want to search using a Global search (not so efficient), just remove the '0' - oTable.fnFilter('')

If you don't like the hack, please look at this API - http://datatables.net/plug-ins/api#fnReloadAjax

P.S. Worked for me with DataTables 1.9.4

BR,
t0m
This discussion has been closed.