How is everyone getting fnServerParams to work???
How is everyone getting fnServerParams to work???
studio6000
Posts: 7Questions: 0Answers: 0
I have copied the code exactly as shown in Examples page and it is still not working for me. What am I doing wrong?
I am using latest versions as am getting js and css files from datatables.net.
My example can be seen here: http://customizepmd.com/pmd135/server_side.php
This is my code:
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "location_id", "value": "23" } );
}
} );
} );
As you can see I want the results to only show the records with a location_id of 23. It is showing all of them.
Please, please help! I have been trying to figure this out for months now.
I am using latest versions as am getting js and css files from datatables.net.
My example can be seen here: http://customizepmd.com/pmd135/server_side.php
This is my code:
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "location_id", "value": "23" } );
}
} );
} );
As you can see I want the results to only show the records with a location_id of 23. It is showing all of them.
Please, please help! I have been trying to figure this out for months now.
This discussion has been closed.
Replies
[quote]
sEcho:1
iColumns:5
...
title:Bay
[/quote]
which corresponds to the code our your page:
[code]
aoData.push( { "name": "title", "value": "Bay" } );
[/code]
Allan