Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A different kind of pager

Status
Not open for further replies.

webron

Programmer
Apr 16, 2000
47
NL
Hi,
im working on a pager for a client.

Here's how it should work.... Let's assume we've got many products. I don't want to show them all at once. But let's say 10 per page.

The pager should not display all pages as links, but it should be configurable. Let's say I want to show a maximum of 10 'pager' links including a link to the first page and a link to the last page. And also including a kind of seperator (not linked).

So, on the first page the page should look something like:
[1] [2] [3] [4] [5] [6] [7] [8] [..] [43] (total: 10)
On page 9 the page should look something like:
[1] [..] [9] [10] [11] [12] [13] [14] [..] [43] (total: 10)
On page 43 the page should look something like:
[1] [..] [36] [37] [38] [39] [40] [41] [42] [43] (total: 10)

My question is:
How do I calculate these 'ranges'?
 
if i'm on page 9, why would there be no link to page 8? that makes it sound like you want links only to higher page numbers, and yet on page 43 you do have lilnks to previous pages

are you thinking maybe of showing 5 links on either side of the current page?

r937.com | rudy.ca
 
You are right. My example was not complete.
Apart from the numeric pager there are [previous] en [next] buttons.
But it's of no concern anymore, as I solved this problem already.

Thanks anyway for your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top