Click to See Complete Forum and Search --> : Yet Another Paginator - Matching JavaScript and PHP versions


zabmilenko
02-06-2008, 04:16 AM
Hi all,

I needed one of these for a website I am recoding that has like 10,000 pages. They want to be able to jump around without having a huge amount of links. They also wanted it fast and ajax-ready.

Here are two versions of the same paginator function. It performs almost the same if you have 20 pages or 2 million pages. The reason I made two versions is you can choose to code around disabled javascript.

JavaScript Version (http://zablocky.org/pagination.js)
PHP Version (http://zablocky.org/pagination.phps)

There is also a live example (http://zablocky.org/pagination.php).


When I searched these forums I got the 500 hits for "pagination", so I know it's like "oh gee, thanks Zab. just what we needed!" I felt that this scheme was worth sharing though.