I am trying to implement paging in PHP, using Json. I need the data to be preloaded, before the user click next results. Please Give me some suggestions or some references.
views:
312answers:
2
A:
jquery has a plugin you can use for pagination, the results have to be preloaded for this as far as i know. We are using this in an app currently, but it wasn't implemented by me...
Nicky De Maeyer
2009-09-23 15:05:13
+2
A:
First off, JSON is for data communication not for data presentation. You need to store the JSON data in a persistent place, either a session variable or in Javascript variables. If you use the PHP session you'd use the PHP code to step through the data, if Javascript I'd go with JQuery. Just store the current starting point in the data in a persistent variable as well and use that as the place to start reading the data each time you display a new page.
hofo
2009-09-23 15:06:03
If you do a Google search for "json php paging" you'll find several tutorials on how to accomplish this: http://www.google.com/search?q=json+php+paging
hofo
2009-09-23 16:28:03
JSON is "for" data representation, not communication (I guess you might have meant "communication" differently, though).
Matt Ball
2009-09-23 16:28:46