How to get servserside processing to work
How to get servserside processing to work
I need pagination support with AJAX, so I came upon this page:
However, I cannot understand how it works. See the below link and snippet from same link:
https://datatables.net/examples/data_sources/server_side.html
$(document).ready(function() {
$('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "../server_side/scripts/server_processing.php"
} );
} );
That Javascript tells nothing of how it's sending the parameters to the server. Where are the page number, results per page, and column names for servserside ordering?
This question has an accepted answers - jump to answer
Answers
Server-side parameters are explained in the docs.
https://datatables.net/manual/server-side
Thanks for the response, tangerine. The key is { serverSide: true } so that it includes the parameters in the query string for GET or in the body for POST.
The only obstacle at this point seems to be how the API requires knowledge of the columns prior to retrieving the data. I am going to post that as another question.
Here's my code for anyone else who may benefit from it: