Add an event if data
Add an event if data
Hi, I really like dataTables and I would like to improve it for my system. at the moment I use the following code to show all the new pending orders every 60seconds. It works perfectly but I would like to add an event like alert() if there is some row in the table. ¿ How can I add this ?
[code]
$(document).ready(function() {
oTable2 = $(\'#example\').dataTable( {
"aaSorting": [[ 0, "desc" ]],
iDisplayLength: 10,
"bProcessing": true,
"bStateSave": true,
"bServerSide": true,
"sAjaxSource": "./scripts/request.php"
} );
setInterval(function(){
oTable2.fnReloadAjax();
},60000);
} );
[/code]
Thanks
[code]
$(document).ready(function() {
oTable2 = $(\'#example\').dataTable( {
"aaSorting": [[ 0, "desc" ]],
iDisplayLength: 10,
"bProcessing": true,
"bStateSave": true,
"bServerSide": true,
"sAjaxSource": "./scripts/request.php"
} );
setInterval(function(){
oTable2.fnReloadAjax();
},60000);
} );
[/code]
Thanks
This discussion has been closed.
Replies
I'm just testing thiis and working well :
"fnInfoCallback": function( oSettings, iTotal ) {
if (iTotal) alert (iTotal);
},