Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Pagination JavaScript
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/26/2006 at 12:10 PM Reply With Quote
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 11333 times
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/31/2006 at 11:18 AM Reply With Quote

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 4941 times
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004