tigra
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 7/26/2006 at 12:10 PM |
|
|
Pagination JavaScript
This script will automatically create pagination links (first, prev, next, last) and fixed number of direct links to the pages in the series of
documents named with the numeric index starting from 1. Example (page1.html, page2.html ... pageX.html)
Working sample attached.
Notes:
pag.js adds the pagination functionality to the page, link it to all the pages of the series. This file can be used by any number of series without
modification.
pag_cfg.js creates the pagination links at the location where
inserted. It just calls writePages function with the parameter. The call is placed it into the separate file so when new page is added to the series
there is no need to modify parameter in all existing pages, just in this one config file that all pages link to. Similar file has to be created for
each of the series individually.
The image paths in pag.js may need to adjusted if they're moved somewhere else of the script is linked from different
directories of the website. Absolute paths should work just fine.
The HTML code can be easily customized to match look and feel of the website.
Direct links to the pages can be removed by setting var n_links in pag.js to 0.
Attachment: pagination.zip (3.48kb)
This file has been downloaded 2483 times
|
|
|
tigra
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 7/31/2006 at 11:18 AM |
|
|
attached package includes the perl script that will automatically update the page counts in all documents of the series.
Attachment: pagination2.zip (3.79kb)
This file has been downloaded 1150 times
|
|
|