Results 1 to 2 of 2

Thread: Page navigation script needed

  1. #1
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Page navigation script needed

    Hi all

    I am currently converting a 30 page booklet to an online document, i wanted to create a script that would allow me to navigate from page to page. Rather than put href's on each page.

    I needed to create an array for the 30 pages (i.e Link[1], Link[2] etc) assigning a value to each one, so when a page is opened it has a number assigned, so when i click on a link(next page or previous page) the Link[n] value will be incremented by one or decreased by one.

    Basically each page is identified by is 'Link[n]' value.

    Can anyone help???

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You will still need a link on the page somehow and creating that array sounds like a lot of work. How about you give each page something uniform as a name. Something like page1.htm, page2.htm etc. Just changing the number for each page. Still, unless you already have a script that is linked to all the pages, this doesn't get you much. If you do, you can add to that script some DOM to create next/last links at both the top and the bottom of each page that will take their numeric component from the page name, incrementing it for the next page and decrementing it for the last. If this much seems to fit your situation, let me know and I'll write up some DOM for it. None of this, including your original idea, will do much for the non javascript enabled browser. So, unless you are certain you will have no users with javascript unavailable, just use real links.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •