www.webdeveloper.com
Results 1 to 7 of 7

Thread: [RESOLVED] "prev" and "next" buttons

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Canada (eh)
    Posts
    288

    resolved [RESOLVED] "prev" and "next" buttons

    Not sure where this belongs, probably JS, but I'll just post it here.

    I'm creating a sales presentation for my Client, and the navigation is a:

    prev 1|2|3|4|5 next

    Prev being a link to the previous page, 1 - 5 being the individual pages, and next being a link to the next page. I'm not worried about last and first links. Just next and previous.

    If someone could please post the code to get this done it would be greatly appreciated! Thanks!
    -sheepo designs-
    My Home Town

  2. #2
    Join Date
    Sep 2005
    Posts
    597
    You can use javascript and your history like so:
    Code:
    <FORM>
    <INPUT type="button" value="previous" onClick="history.go(-1)">
    </FORM>
    or for just next and previous you can just code it like any other link.

    Code:
    <a href="page1.html">previous</a>
    <a href="page3.html">next</a>
    Last edited by Kevey; 04-24-2006 at 10:13 PM.
    css/xhtml firefox dsl ubuntu

  3. #3
    Join Date
    Mar 2005
    Location
    Canada (eh)
    Posts
    288
    The thing is Kevey, theres 50+ pages for this presentaiton. thats ALOT of time and typing especially when I'm not getting paid hourly.

    Is there an alternate route?
    -sheepo designs-
    My Home Town

  4. #4
    Join Date
    Sep 2005
    Posts
    597
    That's no fun. You could paste the javascript onto each page as-is and it'll work...but since it uses the history you would have to run through the whole presentation before they would be able to use the history...I hope that makes sense.

    Just use onClick="history.go(-1) and onClick="history.go(1) for next and previous.

    I'm sure someone here has a better idea, but not sure if it'll be faster. Can you do the presentation in PowerPoint and convert to html? Then the page flippin functionality is built-in.
    css/xhtml firefox dsl ubuntu

  5. #5
    Join Date
    Mar 2005
    Location
    Canada (eh)
    Posts
    288
    Actually, the pres, right now, is in PP. But its very...well...crappy. One word describes the pres. ClipArt.

    Your JS makes complete sense to me, but it desn't help me because of two reasons:
    1) A button would rip apart my CSS, I dont know why but its being very fragile.
    2) Using your JS history button can't bend the sheets of time and let the user go into the future, and onto the next page in line. =P

    But I really appreciate your input! really, I do!
    -sheepo designs-
    My Home Town

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Maybe loading the PPT into OpenOffice and exporting it as Flash would be an alternative. Or you might likes something like this.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  7. #7
    Join Date
    Mar 2005
    Location
    Canada (eh)
    Posts
    288
    Read it wrong, turns out it took a lot more than CSS/HTML =|

    I'll be sure to go through the tut, thanks a lot Ray!

    And you too Kevey!
    Last edited by sheepo-designs; 04-24-2006 at 11:03 PM.
    -sheepo designs-
    My Home Town

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles