Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82446

Handle loading events from Datatable ?

$
0
0

Hello there,

I think I misunderstand how to handle events from Datatables.

I try to load a table with a large amount of data (around 35 000 lines from a database). It works fine but it takes a long time to load, about ten / fifteen seconds. During this time, I would like to display a "Loading ..." message or whatever and remove it once all the data has been loaded, but I can't manage it yet.

I have tried many things, here is the last code I have used, I don't understand well what I'm doing wrong ?

$(document).ready(function() {
   $('#dataTableMainCourante').DataTable();
});

$('#dataTableMainCourante').on('processing', function() {
   alert("Loading ...");
});

$('#dataTableMainCourante').on('init', function() {
   alert("Loading complete !");
});

Thanks for your help !


Viewing all articles
Browse latest Browse all 82446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>