...

View Full Version : Pagination Script - too old and too tired



litebearer
06-06-2004, 06:21 PM
Hi...

Normally I would search google, search the tutorials, experiment, test and finally grasp the concept and implement the solution. (Don't we all say that when the three words 'I am lazy' would replace this whole paragraph?)

the scenario:

I am putting together a php/mysql based site for my old high-school (its been over 40 years. Yes I said 40 - FORTY). The database is setup with the initial data for testing purposes.

Currently, I use a dropdown list culled from the database to call a page that displays the information for any particular alumni (315 alumni). (view the testing version here http://nstoia.com/ef1963/index.php )

Ideally, I would like to keep the dropdown menu but augment it with PREV and NEXT button on either side.

The problem:

As a father, grandfather and business owner, time and energy are in short supply. Therefore I am seeking a 'plug and play' script that with some modifications will achieve the results I am seeking (minor minor modifications and easy to understand).

Anyone aware of such a script?

If not, well the lawn can wait, the tomatoes, cucumbers & strawberries won't get planted; and the grandkids can pull themselves in the wagon. (gee the sympathy tears must be flowing)

Thanks,

Lite...

fimi
06-06-2004, 11:53 PM
Personally I wouldn't use pagination on a dropdown menu!
That's because it’s just a drop down menu, if you were using tables that’s where you would need the Pagination Script.



As a father, grandfather and business owner, time and energy are in short supply. Therefore I am seeking a 'plug and play' script that with some modifications will achieve the results I am seeking (minor minor modifications and easy to understand).
I don't see why you can't afford someone to do what you're trying to accomplish(everything if needed)!
And of course you can find examples in this forum just by searching....
(no offence or anything)

litebearer
06-07-2004, 05:03 AM
Thanks for the response (no offense taken). The idea being using both a dropdown menu and pagination (next - prev) is to afford the viewer the option of 'jumping' to any particular classmate via the dropdown, or to page thru the 'album/yearbook' in a sequential manner without have to scroll thru the dropdown menu.

As to the 'afford' - quite true; however, the point is mute as I was able to acquire a javascript that blends nicely with the dropdown.

I do sincerely appreciate the advice. (I hate non-verbal communications as it it difficult to express sincerity as opposed to sarcasm --- in this case the emotion being expressed is sar.... errr sincerity ;) ).

Thanks,

Lite

mindlessLemming
06-07-2004, 05:19 AM
Without seeing how the back end is set up, I may be waaay off track, but here's a suggestion...

How is the alumni data called? I assume via a primary key/Unique ID?
Couldn't you simply make a link to a page which displays the currentID + 1? and then another which displays the current ID - 1?
My very poorly informed brain tells me that pagination is more suitable for pages which display 10 of 100 results, for example...
When only one result is being called per page this solution *initially* seems both logical and simple, whad-da-ya-wreckon? (aussie slang :))

litebearer
06-07-2004, 07:12 AM
One would tend to agree that that is its more comon usage; however consider a tutorial ( or for all intent and purposes an e-book). The ability to both move from page to page sequentially and to 'leap' to more distant pages is essential.

Whether the information is in tables or not is inconsequential. The over-riding concerns for most users of pagination are (a) making the display of information easier for the viewer to digest (not too much at one time), and (b) keeping the load times reasonable.

From a contextual stand point, breaking up tables into pages is actually less desirable. Why? Because tables frequently are used to display inter-related data. Whereas books, tutorials, albums etc are built of self contained units.

Sorry for running on, the intent is one of just explaining the motivation behind my use of pagination. Perhaps my usage of the term is 'inaccurate'. The objective was (and has been accomplished) to simply have a 'prev' button on the left, a dropdown menu in the middle and a 'next' button on the right. There was never a desire or intent to use the 'Prev 1, 2, 3, 4, ... Next' method of pagination. There are too many 'pages' (315) for that. BTW the system only uses one physical file for displaying each members information, everything is regenerated 'on-the-fly' so to speak.

Thanks,

Lite...

fimi
06-10-2004, 04:42 AM
One would tend to agree that that is its more comon usage; however consider a tutorial ( or for all intent and purposes an e-book). The ability to both move from page to page sequentially and to 'leap' to more distant pages is essential.

Whether the information is in tables or not is inconsequential. The over-riding concerns for most users of pagination are (a) making the display of information easier for the viewer to digest (not too much at one time), and (b) keeping the load times reasonable.

From a contextual stand point, breaking up tables into pages is actually less desirable. Why? Because tables frequently are used to display inter-related data. Whereas books, tutorials, albums etc are built of self contained units.

Sorry for running on, the intent is one of just explaining the motivation behind my use of pagination. Perhaps my usage of the term is 'inaccurate'. The objective was (and has been accomplished) to simply have a 'prev' button on the left, a dropdown menu in the middle and a 'next' button on the right. There was never a desire or intent to use the 'Prev 1, 2, 3, 4, ... Next' method of pagination. There are too many 'pages' (315) for that. BTW the system only uses one physical file for displaying each members information, everything is regenerated 'on-the-fly' so to speak.

Thanks,

Lite...
Good job, i just viewed the page that you've posed in the beginning and i can see how you would need "Back, Next" pagination. However, theoretically, when you click next or back the page should automatically be changed to that profile name so it displays informtation. I would suggest to use the javascript the OnChange element. I thought you wanted to display the page numbers and as you said, there is no need to put 1,2,3 and so on because you are only displaying one item per page and if you do that youll have 315 numbers displaying from 1 to 315.

take care,
fimi

Josh_
06-10-2004, 07:20 AM
Here's a couple tutorials that get you started
http://www.phpfreaks.com/tutorials/73/0.php
http://www.phpfreaks.com/tutorials/43/0.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum