473,883 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cross-browser question: making Netscape recognize frames within document within frame within frame

I tried finding an answer on http://www.quirksmode.org/ without success.

I am attempting a complicated Frames structure. I have made it work in IE,
but not Netscape.

I begin with three frames, where the two lower ones are within a Frameset
within the master Frameset:

111111111111111 1111

2 333333333333333 3
2 333333333333333 3
2 333333333333333 3

I can change the URL of the content of any of the three frames with commands
such as these:

parent.frames[0].location='mast head.html';
parent.frames[2].location='side bar.html#068';
parent.frames[3].location='main space.html#068' ;"

These work in Netscape as well as IE.

The cross-browser differences begin after I split up frame 3 into more
frames. I do this (upon a user click) by loading into frame 3 an HTML file
that is nothing but code for a new frameset. The frameset divides this
window into three columns. Each column loads with an HTML file inside it.

Even here, Netscape and IE both load the new page and display the new
content. The trouble is when I try to substitute new files for the ones in
these sub-frames. IE does what I want, Netscape remains frozen.

To change the content of the frames within the document within the #3 frame
(which itself is within a frameset within a frameset within the master
window), I use:

parent.frames[2].frames[0].location='Prod ucer.html#E1'
or:
parent.frames[2].frames[2].location='reas ons.html#C2'

I have also been able to use:

parent.frames[2].document.frame s[0].location='Prod ucer.html#E1'
or:
parent.frames[2].document.frame s[2].location='reas ons.html#C2'

And even:

parent.parent.f rames[2].frames[0].location='Prod ucer.html#E1'

IE handles them all. Netscape doesn't do anything. Is there a way of
addressing these inner frames via Netscape that I have failed to consider?

--
David Hayes

(remove the name of the programming language from email address to make it
usable)
Jul 23 '05 #1
7 2340


David Hayes wrote:

I am attempting a complicated Frames structure. I have made it work in IE,
but not Netscape.

I begin with three frames, where the two lower ones are within a Frameset
within the master Frameset:

111111111111111 1111

2 333333333333333 3
2 333333333333333 3
2 333333333333333 3
How about posting the relevant HTML instead of ASCII art?
I can change the URL of the content of any of the three frames with commands
such as these:

parent.frames[0].location='mast head.html';
parent.frames[2].location='side bar.html#068';
parent.frames[3].location='main space.html#068' ;"

These work in Netscape as well as IE.
If you have three frames then parent.frames[3] is not null?

Anyway, frames can be given names and then referenced by name which
might be safer then finding the proper index. So you could try
<frame name="frameName " ...>
and then
if (parent.frames && parent.frames.f rameName) {
parent.frames.f rameName.locati on.href = ...
}
The cross-browser differences begin after I split up frame 3 into more
frames. I do this (upon a user click) by loading into frame 3 an HTML file
that is nothing but code for a new frameset. The frameset divides this
window into three columns. Each column loads with an HTML file inside it.

Even here, Netscape and IE both load the new page and display the new
content. The trouble is when I try to substitute new files for the ones in
these sub-frames. IE does what I want, Netscape remains frozen.
Have you checked the Netscape JavaScript console? Does it show errors?
To change the content of the frames within the document within the #3 frame
(which itself is within a frameset within a frameset within the master
window), I use:

parent.frames[2].frames[0].location='Prod ucer.html#E1'
or:
parent.frames[2].frames[2].location='reas ons.html#C2'
As said it might help to name frames and then use the names instead of
the index.
I have also been able to use:

parent.frames[2].document.frame s[0].location='Prod ucer.html#E1'


document.frames is IE object model stuff so that will surely give errors
in the Netscape JavaScript console.

If naming frames doesn't help I suggest you post a URL where we can
visit the problem, but check the JavaScript console and tell us about
the error messages you get. And clearly identify what needs to be done
to trigger the error, where/how you call your frame location change code
(e.g. on button click or directly onload, could be simply a problem with
sibling frames not being accessible then).
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
"Martin Honnen" <ma*******@yaho o.de> wrote in message
news:41******** *************@n ewsread2.arcor-online.net...


David Hayes wrote:

I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape.

I begin with three frames, where the two lower ones are within a Frameset within the master Frameset:

111111111111111 1111

2 333333333333333 3
2 333333333333333 3
2 333333333333333 3
How about posting the relevant HTML instead of ASCII art?


Here goes:

<FRAMESET ROWS="85,*" frameborder="0" border="0"
framespacing="0 ">
<FRAME SRC="masthead.h tml" noresize scrolling="no"
marginheight="0 ">
<FRAMESET COLS="33%,67%" frameborder="0" border="0"
framespacing="0 ">
<FRAME frameborder="0" border="0" framespacing="0 "
marginwidth="10 " marginheight="1 0" SRC="sidebar.ht ml"
name="sidebar" scrolling="auto ">
<FRAME frameborder="0" border="0" framespacing="0 "
marginwidth="10 " marginheight="0 " SRC="mainspace. html"
name="mainspace " noresize scrolling="auto ">
</FRAMESET>
</FRAMESET>
I can change the URL of the content of any of the three frames with commands such as these:

parent.frames[0].location='mast head.html';
parent.frames[2].location='side bar.html#068';
parent.frames[3].location='main space.html#068' ;"

These work in Netscape as well as IE.


If you have three frames then parent.frames[3] is not null?


In that frames [2] and [3] are inside [1], the above referents work.
frames[1] is never used because it contains the other two and thus has no
room to display HTML of its own. (Anyway, this part of the code works in
both NS and IE.)
Anyway, frames can be given names and then referenced by name which
might be safer then finding the proper index. So you could try
<frame name="frameName " ...>
and then
if (parent.frames && parent.frames.f rameName) {
parent.frames.f rameName.locati on.href = ...
}
Actually, I have tried this. Note the names "sidebar" and "mainspace"
above. (Read on to see where what I'm doing now is different from what I
tried in the past.
The cross-browser differences begin after I split up frame 3 into more
frames. I do this (upon a user click) by loading into frame 3 an HTML file that is nothing but code for a new frameset. The frameset divides this
window into three columns. Each column loads with an HTML file inside it.
Even here, Netscape and IE both load the new page and display the new
content. The trouble is when I try to substitute new files for the ones in these sub-frames. IE does what I want, Netscape remains frozen.


Have you checked the Netscape JavaScript console? Does it show errors?


No. My question: would the fact that the errors are occurring within a
document *within* the main document affect this outcome?
To change the content of the frames within the document within the #3 frame (which itself is within a frameset within a frameset within the master
window), I use:

parent.frames[2].frames[0].location='Prod ucer.html#E1'
or:
parent.frames[2].frames[2].location='reas ons.html#C2'


As said it might help to name frames and then use the names instead of
the index.
I have also been able to use:

parent.frames[2].document.frame s[0].location='Prod ucer.html#E1'


document.frames is IE object model stuff so that will surely give errors
in the Netscape JavaScript console.


I have tried to work this by addressing the frames by a name, but not until
the thinking-through this issue that came with the writing of these two
newsgroup posts have I wondered whether it would work to address the frame
by TWO names, such as [...].document['documentName'].frame['mainspace']

That now being said, if the response given here is correct -- that
document.frames is IE without NS support -- mightn't the be no
direct-equivalent solution?
If naming frames doesn't help I suggest you post a URL where we can
visit the problem, but check the JavaScript console and tell us about
the error messages you get. [...]


Before I do, I'd like to pose the question as to whether there is a simple
difference as to whether the frame[n].frame[n], frame[n].document[n],
document[n].frame[n] structures of IE have equivalents in NS. If there are,
I can proceed on my own and report back the success (if any) and what (if
anything) I had to tweak to make this happen. (My proceeding on my own will
save anyone else the effort of trudging through a lot of other functions
within the URL, wherein a lot else is going on.)

--
David Hayes

(remove the name of the programming language from email address to make it
usable)


Jul 23 '05 #3
David Hayes wrote:
I tried finding an answer on http://www.quirksmode.org/ without success.

I am attempting a complicated Frames structure. I have made it work in IE,
but not Netscape.

I begin with three frames, where the two lower ones are within a Frameset
within the master Frameset:

I almost hate to mention this, but has no-one told you that users
actually hate frames anyway and that they are not a very good way of
doing pretty much anything at all in a browser? Seriously, although
there may be an answer to your specific question, if I were you I would
redesign the page and get rid of all the frames.
Jul 23 '05 #4


David Hayes wrote:

I'd like to pose the question as to whether there is a simple
difference as to whether the frame[n].frame[n], frame[n].document[n],
document[n].frame[n] structures of IE have equivalents in NS.


A window (and a frame object is a window object too) has a property
named frames in both IE and Netscape, that property is a collection
allowing to access contained frames by index or by name. The property
named frames of the document object is not available in Netscape.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #5
> I almost hate to mention this, but has no-one told you that users
actually hate frames anyway and that they are not a very good way of
doing pretty much anything at all in a browser?


I contend that frames, when implemented responsibly and under appropriate
circumstances, enhances the user experience. Take for example a site that
offers vocabulary and definitions. A page designed with frames could have
the vocabulary terms in a scrollable list in the left frame. When the user
clicks a term, the definition could show up in the right-side frame. The
benefits to the user come when the user selects a second, third and fourth
(etc.) term to see defined. The list of terms is already on the page. The
user doesn't have to click the "back" button to leave the second page (which
would have the first definition), wait for the reloading of the first page,
then find his place on the list before he can click a term anew. As a user,
I know that I dislike waiting for a page to reload when I could have had the
information stay in place during the time before I return to it, if it's
likely I will return to it.

Some might object that in circumstances such as this, all of the information
should be on one page. This solution might be impractical. A page with
dozens (even hundreds) of terms *and* their definitions might be over 100K.
The initial loading would take a long time. If the user wants to click just
a handful of select terms, that's a lot of wasted bandwidth. With the
two-frame solution, fewer bytes are transferred. The definitions might be
spread over a dozen or more HTML documents. (When I've done something like
this in the past, that's how many pages I had. The answers can be divided
into individual files for "A-B," "C-D," "E-F," etc. Files for answers for
terms starting with letters not selected at all by a particular user, would
never be downloaded from the server for that user.)

In a single-frame equivalent to this, listing the definitions directly
beside or beneath a term would mean that the definitions would be visible to
a wandering eye a split-second after the user sees a term for the first
time. This is not ideal for classroom situations where it's desirable for a
student to think about an unfamiliar word before mulling over what his
existing knowledge leads him to think it might mean. Withholding a
definition until a user click brings about the desirable. Even if the page
were configured so that the user has to click a link which takes him further
down the page where the definition is (as often happens in Q&A formats),
then clicks a link to return to where he was, we're again talking about a
much larger initial download than necessary.

(For what it's worth, I suggest that in a case such as this, the list of
terms be put in a frame set at a fixed width of 200 pixels, with the
right-side frame getting the remainder of the frame, so that people with
bigger screens don't see a whole lot of blank space to the right of the list
of terms.)

--
David Hayes

(remove the name of the programming language from email address to make it
usable)
Jul 23 '05 #6
"Martin Honnen" <ma*******@yaho o.de> wrote in message
news:41******** *************** @newsread4.arco r-online.net...
David Hayes wrote:
I'd like to pose the question as to whether there is a simple
difference as to whether the frame[n].frame[n], frame[n].document[n],
document[n].frame[n] structures of IE have equivalents in NS.


A window (and a frame object is a window object too) has a property
named frames in both IE and Netscape, that property is a collection
allowing to access contained frames by index or by name. The property
named frames of the document object is not available in Netscape.


This actually provides useful information. As I've stated before, I have
working in IE a setup where I have frames and framesets. Inside one of the
embedded frames (let's call it "mainspace" ), I load a particular HTML
document (let's call it the "inner frameset" document) that itself contains
three vertical frames. I manipulate the contents of these three frames in
IE, but haven't been able to replicate this in NS.

If my failure is attributable to NS not recognizing my instructions for
document[n].frame[n] content *within* the master window, then a workaround
is to directly target the HTML document that is itself inside this
"mainspace" frame. One thing I had not considered trying is to remove the
"inner frameset" HTML document, reloading it's content, then reloading it as
the "new" content of "mainspace. " At the least, I might trying reloading
the content and then generating a "refresh" instruction upon the "inner
frameset" document or on the whole window.

--
David Hayes

(remove the name of the programming language from email address to make it
usable)
Jul 23 '05 #7
David Hayes wrote:
I almost hate to mention this, but has no-one told you that users
actually hate frames anyway and that they are not a very good way of
doing pretty much anything at all in a browser?

I contend that frames, when implemented responsibly and under appropriate
circumstances, enhances the user experience. Take for example a site that


Oh, I agree with the advantages of the effects you are discussing. My
apologies if that was not clear. My point was that the same can be done
using much easier <div> layers, which are far easier to handle.
Jul 23 '05 #8

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

Similar topics

12
3895
by: * ProteanThread * | last post by:
but depends upon the clique: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=954drf%24oca%241%40agate.berkeley.edu&rnum=2&prev=/groups%3Fq%3D%2522cross%2Bposting%2Bversus%2Bmulti%2Bposting%2522%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den ...
3
3118
by: rollasoc | last post by:
Hi, Doing a bit of system testing on a Windows 98 laptop. (.Net 1.1 app). Did a bit of testing. Loaded a previously saved file. A gray box appeared with the text and buttons all white rectangles with a big red cross in it. Pressed a button (the one I thought might be ok). My file appeared to load. Then when I clicked on any button on my form, the button was replaced with a white rectangle with a big red cross in it.
4
5593
by: David Peach | last post by:
Hello, hope somebody here can help me... I have a query that lists defects recorded in a user defined date range. That query is then used as the source for a Cross Tab query that cross-tabs count of defect type by calendar month. Defect types are stored in one table, defect transactions in another along with date etc. When I cross-tab the results, defect types that have no defects recorded against them appear as a blank (null) value. That...
23
6556
by: Jeff Rodriguez | last post by:
Here's what I want do: Have a main daemon which starts up several threads in a Boss-Queue structure. From those threads, I want them all to sit and watch a queue. Once an entry goes into the queue, grab it and run a system command. Now I want to make sure that system command doesn't hang forever, so I need some way to kill the command and have the worker thread go back to work waiting for another queue entry.
8
4859
by: Pieter | last post by:
Hi, I'm having some weird problem using the BackGroundWorker in an Outlook (2003) Add-In, with VB.NET 2005: I'm using the BackGroundWorker to get the info of some mailitems, and after each item I want to raise the ProgressChanged-event to update the DataGridView. It works fine when only one Progresschanged is fired, but at the second, third, fopurth etc it raises everytile a 'Cross-thread operation not valid"-exception on lmy...
1
2776
by: Rob Woodworth | last post by:
Hi, I'm having serious problems getting my report to work. I need to generate a timesheet report which will contain info for one employee between certain dates (one week's worth of dates). I have a table containing records for each job done, the records contain date, employee name, job done (a code representing the type of job), cost code (another code), regular hours, and overtime hours. The tricky part is that more than one job can...
6
13181
by: Robert Bravery | last post by:
Hi all, Can some one show me how to achieve a cross product of arrays. So that if I had two arrays (could be any number) with three elements in each (once again could be any number) I would get: the two arrays {"one","two","three"},{"red","green","blue} the result one red one green
7
2644
by: Charles | last post by:
I'd like to develop a simple cross-platform application in C++. I'd like it to run in Windows, OS X, PC-BSD and Linux. From my research, it seems I should use Qt or Gtk as a graphical library. Do you agree? Do you have other tips? How Cygwin could help me? Thanks.
6
8641
by: Simon | last post by:
Hi All, An experiment i'm doing requires requires a synchronous cross-domain request, without using a proxy. I wondered if anyone had any ideas to help me achieve this. Below is what I have tried, including my conclusions/assumptions (which i'll happily be corrected on if it solves my problem!): The requirement not to use a proxy means I can't use the synchronous
6
3998
by: ampo | last post by:
Hello. Can anyone help with cross-domain problem? I have HTML page from server1 that send xmlHTTPRequest to server2. How can I do it? Thanks.
0
9781
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10836
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9564
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7960
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7114
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5791
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.