Forum Moderators: open

Message Too Old, No Replies

History Maintenance in Frames

Individual History for each frame

         

T Suresh Babu

10:22 am on Mar 30, 2002 (gmt 0)

10+ Year Member



Generally browsers maintain history of the pages visited.

I encountered a client site(frame site) in which I have to use two frames in a page.

The requirement is I have to provide with back and forward button in both frames. If I click the back button it should show only the page last visited in that particular frame.

Is it possible without Server side session maintenance or cookie manipulations?

Is it posible with plain
Javascript?

-Suresh Babu

tedster

5:54 pm on Mar 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For a few versions now, browsers do maintain a separate history list for each frame. How they interface that history with the native Back Button may be quirky at times, but all you want to do is access the frame history from within the frame itself.

So your job should be doable, as long as old cross-browser compatibility isn't required. You want to be sure the javascript or jscript is directed to the frame's history itself, rather than the "state" history of the entire frameset which the native Back Button would access.

I'd try something like this - within a frame named "display"

<a href="javascript:parent.display.history.go(-1)">Back</a>