Forum Moderators: open

Message Too Old, No Replies

Pagination of results without reloading

         

kiropyckoticks

2:18 am on Jan 13, 2006 (gmt 0)

10+ Year Member



Hi to all,

What I want to do is to have a webpage that displays results from a query in a paginated format (page 1, page 2 page 3). When you change pages, I dont want the page to request for the next page (like the traditional web pagination), I want it to display the next page immediately. It seems that I have to preload all the results in the page and use javascript or dhtml thing. I am not sure.

Is there anyone who tried this before? How will I do it right?

Thanks!

AvaxHome

3:58 am on Jan 13, 2006 (gmt 0)

10+ Year Member



So-called Ajax technology became very popular thanks to Gmail & Co. It allows you to renew content without refresh/reload - and it doesn't need preloading all the content of next page - the content is only loaded when a user requests page2. Ajax is actually just JavaScript+XML+HTML if you wish - search google for "ajax example" and you will find tons of prewritten code for all cases

tedster

4:01 am on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are correct -- if you don't want the browser to go back to the server to request the next page, all the content needs to be in one html document. Then you use javascript/dhtml to show and hide the various pages (divs in this case) as the user requests by clicking.

I've used this approach a few times, and as long as the total page size is reasonable, it can be excellent for the end user. One downside is that search engines only see one big page -- so more granular keyword searches can be a bit handicapped.