Calling functions / Refreshing Data with AJAX
-
Hi and thanks for the great plugin!
I am quite new to WP and Javascript. My goal is to get dynamic data from a MySQL DB and display it via datatables. As of now, everything works perfectly, besides that I’d like to get rid of refreshing the whole page to get new table data and use AJAX instead.
The question is how to call functions with WP DataTable. This is how I use the plugin:
[wp-datatable id="table"] paging: false, responsible: true, search: true, stateSave: true, [/wp-datatable]
datatables.net has the following codesnippet listed as example which should do exactly what I want:
var table = $('#example').DataTable( { ajax: "data.json" } ); setInterval( function () { table.ajax.reload( null, false ); // user paging is not reset on reload }, 30000 );
Is it possible to implement this code?
I am using the Ajaxify WordPress Site Plugin.Thanks so much in advance!
All the best,
Julian
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Calling functions / Refreshing Data with AJAX’ is closed to new replies.