|
Lumpy posted:Fetch all the IDs in random order, store them as a javascript array. Take the first 20 elements, get the content for them via AJAX, there's your first page. They hit NEXT, get content for IDs 21-40 in your array, etc. My only question with this approach is how do you handle the insertion of new content? Is the user supposed to refresh the page to see the new content or should the new content's ID be appended to the end of the array when the user clicks next?
|
# ¿ Apr 29, 2010 21:17 |
|
|
# ¿ Apr 25, 2024 16:59 |
|
Lumpy posted:If things are being inserted so fast it's relevant, your 'get content for IDs' ajax call could also pass along new Ids, but from the way he described the problem, it doesn't seem like it's a big deal. If you don't see Billy Bob's Sports Bar until the next time you refresh the page and click on X in the pagination UI to see it, meh. The question was in general, not his specific problem. I have to solve this issue of pagination soon and was wondering what the best approach would be.
|
# ¿ Apr 29, 2010 21:38 |
|
Remember that date validation is Locale specific, but there are a lot of good jquery date validator plugins.
|
# ¿ Oct 21, 2010 17:55 |