473,388 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

top.frames[0].history.back() causing wrong frame to navigate backwards

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
Jul 23 '05 #1
1 3181
wa****@isiscpt.co.za (Justin) wrote:
Hi,

I have a simple frameset defined:
<snip />
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.


That seems to be the logical conclusion.
<URL:
http://msdn.microsoft.com/workshop/a...thods/back.asp
/>
states that the back() method performs the same action as a user
clicking the Back button in the browser. The browser -- IE anyways --
only has one history.

Regards,
Steve
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: jj | last post by:
Care to enlight? Thanks!
1
by: Aki | last post by:
Hi! I've been trying to create a home link in a document that is shown in a frameset of two frames. My aim is to show the first documents that were shown in the frames when the frameset was...
1
by: Bill H | last post by:
I run a dbms application that interfaces with the web. This module creates a frames page with two frames ('main' and 'mwinfoframe'). All communication with the dbms is routed through the...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
6
by: rolf.matreskova | last post by:
Hi, should cookies work when referring to an 'external' site in a frame? Here is the situation: http://mysite.com/page1.html contains a frame to http://othersite.com/otherpage1.html. When I...
8
by: rn5a | last post by:
I have a HTML page named Index.html which is divided into 3 frames. The URL of 2 of the frames are HTML pages but the 3rd frame houses a ASP page. Now when I go to Windows Explorer, navigate to...
7
by: swapcool | last post by:
Hi, I am a page having a menu and a few frames life below. The links in menu open in F3 frame. I also have back/forward buttons in F1 frame. ________________________ ____________F1_________|...
7
by: Flyzone | last post by:
Hello, I have a page defined like this: <html> <frameset> <frame src="./topone.pl"> <frameset> <frame src="./frame1.pl"> <frame src="./frame2.pl"> </frameset> </frameset>
0
by: chromis | last post by:
Hi, I'm creating virtual tour of a house, the part I am working on at the moment involves a 360 spin view of the house (a series of 36 flat frames). Each corner of the house has a hotspot so that...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.