473,401 Members | 2,068 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,401 software developers and data experts.

What am I doing wrong in updating other frames

I have a set of web pages that are organized in pairs. One of each pair
contains a graphic and the other is an extended description of the graphic.
I am trying to set it up that selecting a single hyperlink causes the
correct pair of web pages to be loaded into two windows. My current
approach is to specify an onload action in the <BODY> tag of one of the
pages that requests that the corresponding description page be loaded into
the other frame, as well as updating associated forward and backward link
buttons. But I cannot get it to work.

My base frameset looks like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>Physical Layer</TITLE>
</HEAD>
<FRAMESET cols="20%, 80%">
<FRAME src="PhysicalLayerTOC.html" name="toc"/>
<FRAMESET rows="45%, 22%, 33%">
<FRAME src="Title.html" name="foil" frameborder="no"/>
<FRAME src="NavBar.html" name="navbar" frameborder="no"/>
<FRAME src="TitleNotes.html" name="notes" frameborder="no"/>
</FRAMESET>
<NOFRAMES>
<P>This frameset document contains:
<UL>
<LI><A href="Title.html">Title Page for Physical Layer Section</A>
<LI><A href="TitleNotes.html">
Notes for Title Page for Physical Layer Section</A>
</UL>
</NOFRAMES>
</FRAMESET>
</HTML>
PhysicalLayerTOC.html contains links to load the various subdocuments into
the frame names "foil":

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>Table of Contents</TITLE>
</HEAD>
<BODY>
<H1>Index</H1>
<p><b><a href="Title.html" target="foil">Physical Layer</a></b></p>
<p><b><a href="Foil2.html" target="foil">Transmission</a></b></p>
<p><b><a href="Foil4.html" target="foil">Media</a></b></p>
<p><b><a href="Foil6.html" target="foil">Terminology</a></b></p>
<p><b><a href="Foil7.html" target="foil">Telcoese</a></b></p>
<p><b><a href="Foil8.html" target="foil">Topologies</a></b></p>
<p><b><a href="Foil9.html" target="foil">Adaptation</a></b></p>
<p><b><a href="Foil10.html" target="foil">Direct Signalling</a></b></p>
<p><b><a href="Foil11.html" target="foil">Line Driver</a></b></p>
</BODY>
</HTML>

I have a couple of issues I am trying to resolve:

1) Whenever a new document is loaded into frame "foil" I want to load a
corresponding notes document into the frame "notes"
2) Whenever a new document is loaded into frame "foil" I want to update the
previous and next document hrefs in the document NavBar.html

I have tried a number of things, both based upon the O'Reilly book and upon
threads in this and other groups and I just can't seem to get it working. I
am using IE6 on Win XP Home.

For example I have tried the following (from "Foil2.html"):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<script>
update()
{
top.notes.location="Foil2Notes.html";
top.navbar.document.prev.href="Title.html";
top.navbar.document.next.href="Foil3.html";
}
</script>
</HEAD>
<BODY LANG="en-US" DIR="LTR" onload="update()">
....

IE6 detects that the Script is present because the first time I opened
"Foil2.html" it asked for permission to run the code. However the contents
of the "notes" frame do not change, nor do the links in the navbar frame.

FYI "NavBar.html" looks like:

<html>
<head>
<title>My Presentation</title>
</head>
<body>
<img src="Images/CommLine.jpg" border=0/>
<br/>
<center><a href="Title.html" target="foil" name="first">
<img src="Images/top.jpg" alt="First slide" border=0></a>
&nbsp;
<a href="Title.html" target="foil" name="prev">
<img src="Images/prev.jpg" alt="Previous slide" border=0></a>
&nbsp;
<a href="Foil2.html" target="foil" name="next">
<img src="Images/next.jpg" alt="Next slide" border=0></a>
&nbsp;
<a href="Foil11.html" target="foil" name="last">
<img src="Images/bot.jpg" alt="Last slide" border=0></a>
&nbsp;
<a href="../layers.html" target="_top" name="home">
<img src="Images/home.jpg" alt="Home page" border=0></a>
</center>
<hr/>
</body>
</html>

Aug 7 '05 #1
3 1773
Hi Jim,

Jim Cobban schrieb:
top.notes.location="Foil2Notes.html";


location is an object, the URL can be set with
top.notes.location.href = "Foil2Notes.html";

Greetings,

Martin
Aug 7 '05 #2
ASM
Jim Cobban wrote:
I have a set of web pages that are organized in pairs. One of each pair
contains a graphic and the other is an extended description of the graphic.
I am trying to set it up that selecting a single hyperlink causes the
correct pair of web pages to be loaded into two windows.
<a href="graphic_1.gif" target="frame_1"
onclick="parent.frame_2.location='text_1.htm';">gr af 1</a>

or
<a href="text_1.html" target="frame_2">graf 1</a>
and 'text_1.html' has :
<body onload="parent.frame_1.location='graphic_1.gif';">

As you can see (and regardless to your codes given)

it is not :
top.frame.location
but :
parent.frame.location
as you have only an alone frameset
(no other frameset file opened in one of your frames)
My base frameset looks like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>Physical Layer</TITLE>
</HEAD>
<FRAMESET cols="20%, 80%">
<FRAME src="PhysicalLayerTOC.html" name="toc"/>
<FRAMESET rows="45%, 22%, 33%">
<FRAME src="Title.html" name="foil" frameborder="no"/>
<FRAME src="NavBar.html" name="navbar" frameborder="no"/>
<FRAME src="TitleNotes.html" name="notes" frameborder="no"/>
</FRAMESET>
<NOFRAMES>
<P>This frameset document contains:
<UL>
<LI><A href="Title.html">Title Page for Physical Layer Section</A>
<LI><A href="TitleNotes.html">
Notes for Title Page for Physical Layer Section</A>
</UL>
</NOFRAMES>
</FRAMESET>
</HTML>
PhysicalLayerTOC.html contains links to load the various subdocuments into
the frame names "foil":

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>Table of Contents</TITLE>
</HEAD>
<BODY>
<H1>Index</H1>
<p><b><a href="Title.html" target="foil">Physical Layer</a></b></p>
<p><b><a href="Foil2.html" target="foil">Transmission</a></b></p>
<p><b><a href="Foil4.html" target="foil">Media</a></b></p>
<p><b><a href="Foil6.html" target="foil">Terminology</a></b></p>
<p><b><a href="Foil7.html" target="foil">Telcoese</a></b></p>
<p><b><a href="Foil8.html" target="foil">Topologies</a></b></p>
<p><b><a href="Foil9.html" target="foil">Adaptation</a></b></p>
<p><b><a href="Foil10.html" target="foil">Direct Signalling</a></b></p>
<p><b><a href="Foil11.html" target="foil">Line Driver</a></b></p>
</BODY>
</HTML>

I have a couple of issues I am trying to resolve:

1) Whenever a new document is loaded into frame "foil" I want to load a
corresponding notes document into the frame "notes"
page opened in 'foil'
<body onload="parent.notes.location='Notes10.htm';">
2) Whenever a new document is loaded into frame "foil" I want to update the
previous and next document hrefs in the document NavBar.html
page opened in 'foil'
<body
onload="parent.notes.location='Notes10.htm';
with(parent.navbar.document)
{
links['prev'].href='Foil09.htm';
links['next'].href='Foil11.htm';
}">
I have tried a number of things, both based upon the O'Reilly book and upon
threads in this and other groups and I just can't seem to get it working. I
am using IE6 on Win XP Home.
kind of browser has any importance to load pages in frames
For example I have tried the following (from "Foil2.html"):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<script>
please :
<script type="text/javascript">
or other type if script is other than JS
update()
{
top.notes.location="Foil2Notes.html";
top.navbar.document.prev.href="Title.html";
top.navbar.document.next.href="Foil3.html";
}
</script>
</HEAD>
<BODY LANG="en-US" DIR="LTR" onload="update()">
does really O'Reilly give this kind of code ?

at least, and if function update() is known, I would expect :
update()
{
top.notes.location="Notes2.html";
// and not unknown file ('Foil2Notes.html')
top.navbar.document.getElementById('prev').href="T itle.html";
// if 'prev' is the ID of this link
// and not a personal IE code :
// top.navbar.document.prev.href="Title.html";
top.navbar.document.links['next'].href="Foil3.html";
// if 'next' is the name of this link
}
FYI "NavBar.html" looks like:

<html>
<head>
<title>My Presentation</title>
</head>
<body>
<img src="Images/CommLine.jpg" border=0/>
<br/>
<center><a href="Title.html" target="foil" name="first">
<img src="Images/top.jpg" alt="First slide" border=0></a>
&nbsp;
<a href="Title.html" target="foil" name="prev">
<img src="Images/prev.jpg" alt="Previous slide" border=0></a>


Please do something as following (for other browsers than IE) :

<a href="Title.html" target="foil" name="prev">
<img src="Images/prev.jpg" alt="Button previous slide"
title="Previous slide" border=0></a>
--
Stephane Moriaux et son [moins] vieux Mac
Aug 7 '05 #3

"Martin Kurz" <in**@martinkurz.in-berlin.de> wrote in message
news:11*************@elch.in-berlin.de...
Hi Jim,

Jim Cobban schrieb:
top.notes.location="Foil2Notes.html";


location is an object, the URL can be set with
top.notes.location.href = "Foil2Notes.html";

Thank you for that pointer. I have tried both top.notes.location.href and
parent.notes.location.href and neither causes any change to the page
displayed in the other frame.
Aug 8 '05 #4

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!
9
by: Ragnorack67 | last post by:
.... <div id=work>hello</div> .... <IFRAME id="thisframe" src="./something.htm"></IFRAME> <script>
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
2
by: Aaron Ackerman | last post by:
I cannot a row to this bound DataGrid to SAVE MY LIFE! I have tried everything and I am at a loss. The using goes into add mode with the add button adds his data then updates with the update...
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...
8
by: UJ | last post by:
I've got a page where I want to have three frames or areas. On the left - two rows - on the right a single area. Thing is - on the right - I need to load a web page for preview use. From what...
4
by: Rob | last post by:
Hi, I have a master page that contains a table layout. The contentplaceholder is located in one of the table cells. With frames technology it was possible for hyperlinks to load the linked pages...
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
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...
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.