Ajax url reload
Ajax url reload
eaudet
Posts: 2Questions: 1Answers: 0
Hi,
I am following this section: http://datatables.net/reference/api/ajax.url().load()
It does not work. It load my table the first time but the setInterval as no effect.
<script type="text/javascript" charset="utf-8">
function updateTable() {
var oTable = $('#userStats').dataTable({
"processing" : true,
"ajax" : {
"url" : "/RealTimeAnalytics/ScreenersAudit",
"dataSrc" : "stats",
"type" : "GET"
}
});
setInterval(function() {
oTable.ajax.url('/RealTimeAnalytics/ScreenersAudit').load();
}, 3000);
}
</script>
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Top FAQ :-)
Allan
Thanks for reminding me that RTFMYFM still is a good thing to do ;-)
I would suggest to all DataTable beginners to rely ob the DataTable API documentation and not search for a quick an dirty example on some blogger's site. In my case, I used an example from version 9 and was trying use the 10 api...it is a bit confusing.
I probably made a mistake using only a capital letter to distinguish between the two. Should have used
dataTableApi()
perhaps... Too late now :-)Allan