drawcallback with setTimeout datatables 1.10.5
drawcallback with setTimeout datatables 1.10.5
jemz
Posts: 131Questions: 40Answers: 1
hi, is it okay to put setTimeout in the callback ?
like this.
"drawCallback": function( settings ) {
setTimeout(function(){
mytable.ajax.reload();
},5000);
}
because i want to reload my table in every 5 seconds.
Thank you in advance.
This discussion has been closed.
Answers
I don't see why not, although as I noted in your github issue I would suggest setInterval instead.
Allan
Hi @allan thank you for the quick reply...yes I change it to setInterval but I remove it in the drawcallback: because when I look at in the firebug it will request two 2 times.