Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35272

How do I retrieve variables sent with fnServerParams to the server?

$
0
0

I am using dataTables 1.9.1. I want to filter my datatable by a variable I specify in javascript. I am using the following code:

oDataTable = $('#datatable').dataTable( {
    ...
    "bProcessing": true,
    "bServerSide": true,
    ...
    'sAjaxSource': 'ajax-getdatatable.php',
    "fnServerParams": function ( aoData ) {

         aoData.push( { "name": "column_name", "value": "column_value" } );      

     },
     ...
} );

How do I access "column_value" in "ajax-getdatatable.php", which queries my database?


Viewing all articles
Browse latest Browse all 35272

Trending Articles