Reloading Table Issues
Reloading Table Issues
stilvia
Posts: 2Questions: 1Answers: 0
Hi all,
have integrated DataTables in the last week and I love it! Previously I use a select box and ajax to retrieve a complex output of html. I have tried to implement the below code. The issue is the datatables does not update the updated dom. When I filter results I loose all the data. Any help would be great.
$('#selector').on('change', function (){
var form_data = $("#submitsearch").serialize();
$.ajax({
url: "homedata2.php",
type: 'POST',
data: form_data,
success: function (data) {
$('#example tbody').html(data);
}
});
var table=$('#example').DataTable();
table.rows().invalidate().draw();
return false;
});
This discussion has been closed.
Answers
Any help?