Jump to content
Larry Ullman's Book Forums

Recommended Posts

i am sure the logic for this is quite simple.  I just cannot see it.

 

My pagination works relly well, too well in fact.

 

I have a file that displays 10 records at a time.  However, the pagination dispalys all 1643 page numbers.

 

How do I limit the display to just 3 or 4 page numbers with ellipsis each side after moving beyond the initial 3 or 4 pages?

Link to comment
Share on other sites

 

My pagination works relly well, too well in fact.

 

Hehe! That made me laugh.

 

If you, for example, want to display three pages on each side, you need to check the difference between the current page number and both 1 (the first page) and the total number of pages (the last page), and if there are more than three pages on either or both sides, you need to create links for those three pages as well as create arrow links or whatever for the pages beyond that.

 

One thing I would encourage though is to allow users to freely enter a number for quickly jumping to a particular page. It helps a lot when there are a lot of results. You might also want to consider letting users select the number of results per page (e.g., 10, 20 or 50).

Link to comment
Share on other sites

 Share

×
×
  • Create New...