I\'m using jQuery DataTables, my JavaScript code is shown below:
$(document).ready(function() {
var tbl = $(\'#table_tabl\').DataTable({
responsive:
Datatable Version : 1.10.0-beta.1 Using fnDraw to Redraw the table.
Sample code for using fndraw
$(document).ready(function() {
var oTable = $('#example').dataTable();
// Re-draw the table - you wouldn't want to do it here, but it's an example :-)
oTable.fnDraw();
} );
Source
$(document).ready(function() {
var tbl = $('#table_tabl').DataTable({
responsive: true,
"oLanguage": {
"sUrl": "fr_FR.txt",
},
"processing": true,
"serverSide": true,
"sAjaxSource": "server_processing_reservTables.php", // I want to add a parmeter to it dynamically when a select element is selected
"aoColumnDefs": [{
"aTargets": [3],
"mData": 3,
"mRender": function(data, type, full) {
return '';
}
}],
"aLengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "Tout"]
]
});
$("#select_id").change(function () {
var end = this.value;
var NTypSource = 'server_processing_reservTables?type='+end+'';
var oSettings = tbl.fnSettings();
oSettings.sAjaxSource = NTypSource;
tbl.fnDraw();
});
});