Datatables server side and send custom parameters
Datatables server side and send custom parameters
I have a trouble using serverside and fnserverparams parameters.
Without the fnserverparams option all goes fine, but with both options and debugging in my browser I check that the ajax call is never sended to my server.
My table configuration is:
$(document).ready(function() {
var table=$("#example").DataTable( {
"columns": [
{ "data": "run_number", "width": "10%", className: "dt-body-center"},
],
"ajax" : "searchRunnes.php",
"fnServerParams" : function(aoData) {
aoData.push({ name: "run_number", value; "1" });
},
"bProcessing": true,
"serverSide": true,
});
Answers
fnServerParams is legacy. Use
ajax.data
. See this example.Allan