I want to refresh table data on ajax form submit how to do without reloading page . I'm using data table 1.7.6
I;m using datatable 1.7.6 in below is initiation
I want to refresh table data on ajax form submit how to do without reloading page . I'm using data table 1.7.6
I;m using datatable 1.7.6 in below is initiation
Use ajax.reload
$('#table-id').DataTable().ajax.reload();
Destroy the datatable
$('#teamTable').dataTable().fnDestroy();
update contents. then ,
Reinitalize it ..
$('#teamTable').dataTable();
Since, you are working with Datatable 1.7.6 ajax.reload()
will not work for you. Luckily, the author created a plugin before he introduced ajax.reload
You need this plugin called fnReloadAjax
Implementation is there on the page too.
It'd go something along the lines of:
var oTable = $("#usertable").dataTable ({
//your options
//more options
});
And then to reload:
oTable.fnReloadAjax();
Though, if you can, try to upgrade to 1.10.