Frames history

Discussion in 'HTML' started by gkorland@gmail.com, Sep 30, 2006.

  1. Guest

    Hi,

    I have a page with two frames.
    I want to add backward & forward buttons to each of the frames.
    How can I control each of the frames history?

    Thanks,
    Guy
    , Sep 30, 2006
    #1
    1. Advertising

  2. dorayme Guest

    In article
    <>,
    wrote:

    > Hi,
    >
    > I have a page with two frames.
    > I want to add backward & forward buttons to each of the frames.
    > How can I control each of the frames history?


    You need to explain in much greater detail what you want as there
    are several interpretations of what this describes. How about a
    url with some attempt at what you want for a start so the source
    can be viewed etc.

    --
    dorayme
    dorayme, Oct 1, 2006
    #2
    1. Advertising

  3. keeper Guest

    <a href="javascript:history.back(1)" target="myframe1">Go back</a>

    i dunno about forward, I rarely use javascript.. infact i avoid it at
    all costs. but theres the basic premise behind keeping history. Thouhg
    i doubt you'll be able to keep any type of state unless your using a
    server side language. Javascript:history.back will act the same way as
    pressing your browsers back button. To accually control one frame and
    keep it completely seperate from the other, you'll need to keep state.
    and that requires some interesing programing. (see php or perl ).


    wrote:
    > Hi,
    >
    > I have a page with two frames.
    > I want to add backward & forward buttons to each of the frames.
    > How can I control each of the frames history?
    >
    > Thanks,
    > Guy
    keeper, Oct 1, 2006
    #3
  4. Ben C Guest

    On 2006-09-30, <> wrote:
    > Hi,
    >
    > I have a page with two frames.
    > I want to add backward & forward buttons to each of the frames.
    > How can I control each of the frames history?


    I would suggest put the back and forward buttons for the frames outside
    the actual frames, in the top-level document.

    In the click handlers for those buttons, do this kind of thing:

    window.frames["firstFrame"].history.back();
    window.frames["firstFrame"].history.forward();

    etc.

    This way you're accessing the history objects belonging to the windows
    of each frame.
    Ben C, Oct 1, 2006
    #4
  5. Guest

    > window.frames["firstFrame"].history.back();
    > window.frames["firstFrame"].history.forward();


    I tried it and it seems like the history is still global for all the
    frames, same as with the Backward button.

    Guy
    , Oct 1, 2006
    #5
  6. Ben C Guest

    On 2006-10-01, <> wrote:
    >> window.frames["firstFrame"].history.back();
    >> window.frames["firstFrame"].history.forward();

    >
    > I tried it and it seems like the history is still global for all the
    > frames, same as with the Backward button.


    Interesting. I tried it on Firefox and it worked pretty well, until you
    went back too far, at which point the histories seemed to sort of
    cross-over and the whole frameset disappeared.

    Sounds like this isn't a reliable way to do it in any case then.
    Ben C, Oct 1, 2006
    #6
  7. Guest

    Infact it doens't work at all (I tried in FireFox as well).
    Try to click on a link on frame A and then try to go back on frame B.
    Frame A will go back.

    Guy
    , Oct 2, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam Stephenson
    Replies:
    1
    Views:
    213
    Andrew Walrond
    Jun 18, 2005
  2. Justin
    Replies:
    1
    Views:
    222
    Steve van Dongen
    Jul 15, 2004
  3. Jenn
    Replies:
    2
    Views:
    139
  4. Replies:
    2
    Views:
    270
    nutso fasst
    Oct 17, 2006
  5. Niall
    Replies:
    3
    Views:
    155
    Niall
    Dec 6, 2006
Loading...

Share This Page