Loading new data into Data tables
Loading new data into Data tables
kaippally
Posts: 4Questions: 0Answers: 0
I have a datatable with data loaded via AJAX
Like this:
$(document).ready(function() {
oTable = $('#snapshot').dataTable( {
'sScrollY': 500,
'bPaginate': false,
'bScrollCollapse': true,
'bJQueryUI': true,
'bStateSave': false,
"bFilter": true,
'bSort': true,
"bAutoWidth": false ,
"sAjaxSource": 'live_vision_data.php'
} );
} );
How do I reload the same ajax source file "live_vision_data.php" with one click?
Like this:
$(document).ready(function() {
oTable = $('#snapshot').dataTable( {
'sScrollY': 500,
'bPaginate': false,
'bScrollCollapse': true,
'bJQueryUI': true,
'bStateSave': false,
"bFilter": true,
'bSort': true,
"bAutoWidth": false ,
"sAjaxSource": 'live_vision_data.php'
} );
} );
How do I reload the same ajax source file "live_vision_data.php" with one click?
This discussion has been closed.
Replies
then you can call as
var contentTable = $("#contentTable").dataTable( );
$(document.body).on('click', '#reloadTableData', function(event){
contentTable.fnReloadAjax();
event.preventDefault();
});