#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    55
    Rep Power
    14

    javascript history function


    I'm trying to setup a webpage with two frames, a top and a bottom. The top frame has an image that has the IE forward and back bottons saved as images. The bottom can be whatever. The standard IE toolbar will be replaced by my version of it in the topframe.

    I am using the javascript:history.go(-1) function for the back button and am targeting the bottom frame. The problem I am having is that, I believe the history back bottun is only looking at the history of the top frame. I want it to look at the history of the bottom frame history so that if a user clicks on the back button on the top frame, it will load the previous url from the bottom frame.

    How can I get this to work?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Dublin
    Posts
    413
    Rep Power
    14
    have you tried window.frames.bottomFrameName.history.go(-1)??
    (or just window.frames[1].history.go(-1)
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    55
    Rep Power
    14

    reply


    I just tried the second one and target=bottomframe. I will try your suggestion and let you know if it works.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    55
    Rep Power
    14

    not working


    It seems to be taking me back when I click the icon, but I'm getting a 404 error. I also have another link I found which seems to be taking me back to a certain url.
    I have a link that says "back" and when I click on it, it sometimes takes me to a certain url. It is very similiar to the code you meantioned but slightly different.
    Last edited by hoffa; April 14th, 2004 at 09:45 AM. Reason: dead link
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    55
    Rep Power
    14

    local


    It looks like it will work with local links, but not http:// links such as http://www.yahoo.com
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    India
    Posts
    18
    Rep Power
    0
    could u try this way?
    javascriptarent.frames.history.go(-1)
    with regards
    elisabeth
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    55
    Rep Power
    14

    what


    elisabeth,

    What?
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    200
    Rep Power
    14
    Elisabeth meant:

    javascript:parent.frames.history.go(-1)

    :p is translated to a smiley

    I disabled it in this post, so it should show up ok now

    /* start anti frames rant */
    Btw, frames and history don't really mix that well on all browsers. And most web designers freak out when you mention frames.
    /* end anti frames rant */

IMN logo majestic logo threadwatch logo seochat tools logo