Forum Moderators: open

Message Too Old, No Replies

How do I re-establish frames but preserve back button functionality

         

webgeneral

2:43 pm on Jan 14, 2003 (gmt 0)

10+ Year Member



Hi

I was wondering if anyone had any clever javascript technique that allows the frames context to be re-established without affecting the back button functionality.

I am aware of the following code that unfortunately disables such functionality:

<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self) self.location.href = "FRAMESET PAGE NAME HERE";
// -->
</SCRIPT>

jdMorgan

4:04 pm on Jan 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



webgeneral,

Try using ".replace" to preserve the history, rather than adding a new history entry:


if (parent.frames.length == 0) top.location.replace('myframeset.html');

I converted this from a piece of code intended to escape from referring frames, but it might work for you. It is untested, though.

HTH,
Jim