# Jump to a particular page in pagination

**URL:** <https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416>\
**Category:** Rails\
**Created:** [February 22, 2007, 3:18am UTC](https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416 "2007-02-22T03:18:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [February 22, 2007, 3:18am UTC](https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416/1 "2007-02-22T03:18:11Z")

</div>

Hi,

On one page in my application there is a list of all the merchants that  
are in the system and with each merchant there is a link which takes the  
user to a page where the details are listed of all the merchants using  
pagination. I can show all the merchants using pagination. But the  
problem is that how do I know which page I have to show when the link is  
clicked. For ex. if there are 100 merchants and I list then and user  
clicks on ‘DEF’ , then how do I know that ‘DEF’ will be on page 5 and  
show page 5 directly and from there user and use next,first, etc.  
buttons to go through the rest.

Thanks.

---

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [February 22, 2007, 3:44am UTC](https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416/2 "2007-02-22T03:44:24Z")

</div>

Rm Rm said the following on 02/21/2007 09:18 PM:

> On one page in my application there is a list of all the merchants that  
> are in the system and with each merchant there is a link which takes the  
> user to a page where the details are listed of all the merchants using  
> pagination. I can show all the merchants using pagination. But the  
> problem is that how do I know which page I have to show when the link is  
> clicked. For ex. if there are 100 merchants and I list then and user  
> clicks on ‘DEF’ , then how do I know that ‘DEF’ will be on page 5 and  
> show page 5 directly and from there user and use next,first, etc.  
> buttons to go through the rest.

You seem to be asking two contradictory questions.

Either you have the situation of so many users per page, say 10.  
In which case the links are something like

```
Page 1, items 00 - 09 search condition: offset = 0, count = 10
Page 2, items 10 - 19 search condition: offset = 10, count = 10
Page 3, items 20 - 29 search condition: offset = 20, count = 10
...

```

Of course you could have overlap

The other is that you are presenting an alphabetic interface, like a  
telephone number insert in your DayTimer© pocket book

Page 1, ABC search condition: name begins with A or B or C  
Page 2 DEF search condition: name begins with D or E or F  
…

Of course with this arrangement you may, just like in your DayTimer©,  
have  
pages with no entries.

I suppose you could paginate the "ABC"s etc.,

Personally I believe in K.I.S.S. Simple pagination is good, but you  
also  
want a search box. A 'search for names beginning with …" type search  
is  
good. Think about what the voice-menu systems on many corporate IVR s  
offer: “Corporate directory: key in the first few letters of the name of  
the  
person you wish to speak to …”

If its simple for the user its probably going to be simple for you as  
well.

–  
Friction is a drag.

---

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [February 22, 2007, 5:09am UTC](https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416/3 "2007-02-22T05:09:47Z")

</div>

What I want is something like this:

Suppose I have a drop-down with the names of all the merchants that are  
in system and I select one say ‘John D.’. then the screen should be  
displayed which has the details of ‘John D.’ in a html table row. And  
that table is a page in a pagination\_by\_sql. This means that it is the  
page which has ‘john doe’ alongwith other merchants and user can use  
‘next’, previous buttons etc to see other merchants. Kind of table of  
contents in a book gives me page number of a topic and from there I can  
turn pages and read any part of the book. Table of contents just gave me  
a landing page to land and then I can move around. Something like this I  
want.

Anton A. wrote:

> Rm Rm said the following on 02/21/2007 09:18 PM:
> 
> > On one page in my application there is a list of all the merchants that  
> > are in the system and with each merchant there is a link which takes the  
> > user to a page where the details are listed of all the merchants using  
> > pagination. I can show all the merchants using pagination. But the  
> > problem is that how do I know which page I have to show when the link is  
> > clicked. For ex. if there are 100 merchants and I list then and user  
> > clicks on ‘DEF’ , then how do I know that ‘DEF’ will be on page 5 and  
> > show page 5 directly and from there user and use next,first, etc.  
> > buttons to go through the rest.
> 
> You seem to be asking two contradictory questions.
> 
> Either you have the situation of so many users per page, say 10.  
> In which case the links are something like
> 
> ```
> Page 1, items 00 - 09 search condition: offset = 0, count = 10
> Page 2, items 10 - 19 search condition: offset = 10, count = 10
> Page 3, items 20 - 29 search condition: offset = 20, count = 10
> ...
> 
> ```
> 
> Of course you could have overlap
> 
> The other is that you are presenting an alphabetic interface, like a  
> telephone number insert in your DayTimer© pocket book
> 
> Page 1, ABC search condition: name begins with A or B or C  
> Page 2 DEF search condition: name begins with D or E or F  
> …
> 
> Of course with this arrangement you may, just like in your DayTimer©,  
> have  
> pages with no entries.
> 
> I suppose you could paginate the "ABC"s etc.,
> 
> Personally I believe in K.I.S.S. Simple pagination is good, but you  
> also  
> want a search box. A 'search for names beginning with …" type search  
> is  
> good. Think about what the voice-menu systems on many corporate IVR s  
> offer: “Corporate directory: key in the first few letters of the name of  
> the  
> person you wish to speak to …”
> 
> If its simple for the user its probably going to be simple for you as  
> well.
> 
> –  
> Friction is a drag.

---

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [February 22, 2007, 3:01pm UTC](https://www.ruby-forum.com/t/jump-to-a-particular-page-in-pagination/86416/4 "2007-02-22T15:01:37Z")

</div>

Rm Rm said the following on 02/21/2007 11:09 PM:

> a landing page to land and then I can move around. Something like this I  
> want.

What you’re describing is essentially a “starting at” mechanism.

But make up your mind. You’ve now described THREE completely different  
user  
interfaces. All are valid, all are intelligible to the user. Each by  
itself.

Pick one and stick with it.

Stop jumping around in your design or adding too many features.  
You’ll only confuse the user, not impress him with your technical  
skills.

There’s a term for this" “Creeping feaureitis”.  
Its a pernicious disease and often fatal to the product unless cured by  
amputation or the application of marketing dollars on a scale only  
possible  
by the likes of Microsoft or IBM. (e.g Microsoft Word)

–  
Only one absolute certainty is possible to man, namely that at any given  
moment the feeling which he has exists.  
Thomas H. Huxley
