473,399 Members | 3,106 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,399 software developers and data experts.

iframe and netscape question

Dom
Hi,

Can anyone help me with this teaser ?

I have an iframe with id and name set to 'iframe',
in which I load a frameset of two frames (lets call them TopFrame and BottomFrame).

Inside frame BottomFrame I have an image object which I manipulate
from TopFrame and use this to do so :

top.iframe.BottomFrame.img1.style.borderColor="#CC 6633";

Now this works no problemo in Internet Explorer.

However, in Netscape 6.2.1 I get this error in the javascript console :

Error: top.iframe.BottomFrame.img1 has no properties

I tried a number of different ways of getting to img1 in netscape to no avail.

Can anyone out there suggest some things to try, better yet correct my mistake ?

Thank you very much if so.

-Dominic
Jul 20 '05 #1
1 2300
Dom wrote:

I have an iframe with id and name set to 'iframe',
in which I load a frameset of two frames (lets call them TopFrame and BottomFrame).

Inside frame BottomFrame I have an image object which I manipulate
from TopFrame and use this to do so :

top.iframe.BottomFrame.img1.style.borderColor="#CC 6633";

Now this works no problemo in Internet Explorer.

However, in Netscape 6.2.1 I get this error in the javascript console :

Error: top.iframe.BottomFrame.img1 has no properties


Netscape uses collections for frames and images which are also
implemented in IE.

top refers to the topmost document window,
parent refers to the immediate parent document window,
window.frames is a collection/array of frames within a window,
document.images is a collection/array of document images,

So would try either:

parent.frames.BottomFrame.document.images['img1']

or the long way:

top.frames.iframe.frames.BottomFrame.document.imag es['img1]

(Untested for this post. If an image with id value 'img1' doesn't work,
try assigning it a name attribute of 'img1')
HTH,

Dom Leonard

Jul 20 '05 #2

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

Similar topics

2
by: splish | last post by:
Hello, I have the following problem: An Iframe exists inside a page (that has content exceeding the height, therefore scrollbars kick in) - normal stuff. When I want to use anchor references...
12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
1
by: Christian Radermacher | last post by:
Hi, the following code has the mentioned behaviour: <html> <head> <script type="text/javascript"> function newA() { for (i=0;i<3;i++) { var a = window.frames.document.createElement("a");
3
by: John Chen | last post by:
I need to use iframe to create a floating frame. But the contents in the iframe is not a external html file. Rather, it will be dynamically created by jsp. How can I set the src attribute to a URL...
4
by: Marina Ferguson | last post by:
Hi, I have a document with an iframe. The main doc has a "Print" button. The idea is that when the user clicks it, the contents of the iframe is printed. For some reason instead of the iframe...
4
by: Treetop | last post by:
I have code that works in IE but not Netscape 7+. This code allows me to have a list of links that bring up an image and description in an iframe. This works great in IE, however I have users...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
23
by: vunet | last post by:
It is recommended by some sources I found to create IFrames in IE using document.createElement('<iframe src="#">') instead of document.createElement('iframe'). Why and what browser versions to...
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
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,...
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
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.