#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Cary, NC
    Posts
    27
    Rep Power
    0

    back button inside CSS layout


    I used one of the CSS stylesheets to create 3 column layout that I found on this site. How would I put a Back Button (javascript) inside one of the columns at the buttom. Are there any free javascripts for back buttons or an example of a stylesheet.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    a back button could be anything from a form button, to a link and even an image...etc...etc.. etc...

    all you really need to do is use the javascript history object, and join it with an onclick event...

    so for a link you could do it like this:

    Code:
    <a href="url.com" onclick="javascript:history.go( -1 );return true;">[back]</a>
    I used that code a long time ago, not sure on how standards compliant it is...but now that you see how easy it is, you could
    always do a little research on the topic.
    (java script should be one word, the forum separates it)

    good luck.

    oopss..forgot, can't have a url, it defeats the purpose of the back button...
    so like the next post has it... use # in place of url.
    Last edited by IBM; April 8th, 2003 at 12:32 AM.
  4. #3
  5. No Profile Picture
    Got source?
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2003
    Location
    Laguna Niguel, California, USA
    Posts
    2,331
    Rep Power
    14
    <a href="#" onClick="history.go(-1)">Back</a>
    *OR*
    <input type=button value="Back" onClick="history.go(-1)">
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Cary, NC
    Posts
    27
    Rep Power
    0

    back button


    Thanks for the help.
    Debbye

IMN logo majestic logo threadwatch logo seochat tools logo