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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...