Double entrys in Table after ajax call
Double entrys in Table after ajax call
Schmakus
Posts: 15Questions: 10Answers: 0
Hi there!
With following Code, I have double entrys in my table.
I want to reload the table, if there is new data in the database.
I check for new data with a separate ajax call. If it's true, then I call the function "RefreshDataOnPage"
var table_show_places = $('#table_show_places').DataTable( {
"order": [ [ 1, 'asc' ]],
"lengthMenu": [ [10, 15, -1], [10, 15, "All"] ],
"ajax": {
"url": "ajax/table.show.places.php",
},
"columns": [
{ "data": "id", "orderable": false },
{ "data": "place", "orderable": false }
],
"language": { "url": "js/german.js"},
"ordering": false
});
function RefreshDataOnPage(){
table_show_places.ajax.reload( null, false); // user paging is not reset on reload
}
This discussion has been closed.