473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript">
function doBack() {
var backFrame = top.frames[0];
backFrame.histo ry.back();
}
</script>

<TITLE>One</TITLE>
</HEAD>
<BODY>
<b>two</b>
<br/>
<a href="javascrip t:doBack();">ba ck</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 3201
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

1
2080
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 loaded the first time. The link works perfectly in NN4.5 and 7.1, but IE6 and Opera7 are causing headaches. I've tried to do the link with the...
1
2830
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 'mwinfoframe' (it's sort of hidden in that it is assigned 1% (so I can view it in IE). I'm having problems with Firefox working properly while both IE 6...
3
2453
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 button inside a-tag with attribute target isn't anything new relating ASP.Net, its same old HTML). He claimed that you could change another page´s...
6
8017
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 navigate in the frame from otherpage1.html to http://othersite.com/otherpage2.html the server returns a cookie for the browser to set. But it...
8
3340
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 the folder in which the all the 4 files (3 HTML + 1 ASP) reside & select Index.html (by clicking with the mouse or by using the arrow keys on the...
7
1922
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_________| | F2 |................................ | | .... |................................ | | M | .............F3...............| | E |...
7
2338
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
1920
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 the user may click to navigate to that corner. I have completed the code to get the house to spin to the correct hotspot when the user clicks on a...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.