Hi,
I have a simple frameset defined:
---------------- index.html ----------------
<FRAMESET COLS = "225,*">
<FRAME NAME = "a" SRC = "one.html">
<FRAME NAME = "b" SRC = "one.html">
</FRAMESET>
------------------------------------------------
And two pages:
---------------- one.html ----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>One</TITLE>
</HEAD>
<BODY>
<b>one</b>
<br/>
<a href="two.html">next</a>
</BODY>
</HTML>
---------------- two.html ----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<script language="JavaScript">
function doBack() {
var backFrame = top.frames[0];
backFrame.history.back();
}
</script>
<TITLE>One</TITLE>
</HEAD>
<BODY>
<b>two</b>
<br/>
<a href="javascript:doBack();">back</a><br/>
</BODY>
</HTML>
------------------------------------------------
When I do the following:
Click 'next' in the first frame.
Click 'next' in the second frame.
Click 'back' in the first frame.
..... the frame that is moved back is the second frame (last one that I
navigated with) and NOT the first as expected.
From what I can gather from the manuals/references, the code:
top.frames[0].history.back();
should ONLY affect the first (zero index) frame. Why is it affecting
the other frame?
There doesn't seem to be a per frame history, but rather a global
history and the frame specifier is ignored.
How do I reliably navigate back on a per frame basis?
This behaviour is the same on IE6 and Firefox 0.91.
Thanks