How to populate datatable from client-side Javascript GET JSON 1 page at a time?

How to populate datatable from client-side Javascript GET JSON 1 page at a time?

genic123genic123 Posts: 1Questions: 1Answers: 0

Hi, currently I submit the form with a hidden value populated from JSON file using $.getJSON(jsonFile, function(result) which works. I submit the data to the server. Server returns the results into populating JQuery datatable with pagination, lets's say all 100 items and displays 10 results per page with 10 pages. And when I click on each page it shows next. But now I have a need to reduce that hidden value. So what I need to do is to send only 1st 10 items and total number of items 100 to the server. Then when I click on page 2 - it should call Javascript code to grab 2nd set of 10 items, page 3 - 3rd set of items from JSON, and so on. Is it supported? How to implement this behaviour. I think "server side" = true is not what I need, because I am using client side Javascript. Thank you.

This discussion has been closed.