Frames history

G

gkorland

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
 
D

dorayme

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.
 
K

keeper

<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 ).
 
B

Ben C

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.
 
G

gkorland

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
 
B

Ben C

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.
 
G

gkorland

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top