How to Pagination With Ajax datatables
How to Pagination With Ajax datatables
bala16
Posts: 5Questions: 4Answers: 0
Only one question, I'm trying to implement an ajax pagination, my result table is the result of mysql query, but the query has LIMIT 0,10 on page 1. When the user click on new pages an ajax call sets the new LIMIT for the same query. what can i do for this. Any Suggestion..
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi. Maybe this helps: https://datatables.net/examples/data_sources/server_side.html
In my case i used a php script to provide data from elasticsearch.
i am using this below code, but can't get pagination and how to enable scroll here as it's just passing json. please help
$.ajax({
"url": 'data/arrays.txt',
"type": "POST",
"success": function(json) {
var tableHeaders;
$.each(json.columns, function(i, val){
tableHeaders += "<th>" + val + "</th>";
});
It's done