SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Previous / Next

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Palm Desert, California
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Previous / Next

    Is there a way to go to the next or previous static HTML page is JavaScript? I know in PHP you can do it with MySql and a database but I haven't been able to find any thing that will work with static HTML pages.



    Thanks,

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    location

    You can use javascript to change the location property. eg.
    Code:
    document.location.href = 'page2.html';

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Palm Desert, California
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, my javascript is terrible.. Where would I put that line and wouldn't there be more to it then just one line?

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    javascript solution



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
  •