473,568 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing Frames

Hi,

I'm looking at some old code, and am having a problem with IE having
changed how accesses an object:

pages = window.parent.f rames.item(1).d ocument.all("po sition");

This works under Win200 and 6.0.2800.1106.

But not under WinXp and 6.0.2900.2180.

Does anyone know what IE might be looking for?

Thanks,

--
J. Moreno
Jul 29 '06 #1
5 2299
J. Moreno said the following on 7/28/2006 8:30 PM:
Hi,

I'm looking at some old code, and am having a problem with IE having
changed how accesses an object:

pages = window.parent.f rames.item(1).d ocument.all("po sition");
What does item(1) refer to?
What is "position"?
This works under Win200 and 6.0.2800.1106.

But not under WinXp and 6.0.2900.2180.

Does anyone know what IE might be looking for?
Not even MS is sure what IE might be looking for about 90% of the time.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 29 '06 #2
Randy Webb <Hi************ @aol.comwrote:
J. Moreno said the following on 7/28/2006 8:30 PM:
Hi,

I'm looking at some old code, and am having a problem with IE having
changed how accesses an object:

pages = window.parent.f rames.item(1).d ocument.all("po sition");

What does item(1) refer to?
An individual frame. In FF window.parent.f rame[1] works.
What is "position"?
An ID (yeah, I know, bad idea to have more than one element with the same
ID, I'll fix that next).
This works under Win200 and 6.0.2800.1106.

But not under WinXp and 6.0.2900.2180.

Does anyone know what IE might be looking for?

Not even MS is sure what IE might be looking for about 90% of the time.
Heh. But I need to find out what it wants this time...

--
J. Moreno
Jul 31 '06 #3

J. Moreno wrote:
pages = window.parent.f rames.item(1).d ocument.all("po sition");

This works under Win200 and 6.0.2800.1106.
But not under WinXp and 6.0.2900.2180.
Didja already try debugging to see what fails? Like an alert and
removing the ending object each time until it works?

alert(window.pa rent.frames) etc.

What error did you get, btw? No permission or ?? W2K and XP seem
to sometimes have different security models.

Also, personally, I'd name the frames so you don't have to do the
frames.item(1) thingie. Ooops, never mind, I forgot that you said it
was old code.

Luck! - Kev

Jul 31 '06 #4
J. Moreno said the following on 7/31/2006 12:08 PM:
Randy Webb <Hi************ @aol.comwrote:
>J. Moreno said the following on 7/28/2006 8:30 PM:
>>Hi,

I'm looking at some old code, and am having a problem with IE having
changed how accesses an object:

pages = window.parent.f rames.item(1).d ocument.all("po sition");
What does item(1) refer to?

An individual frame. In FF window.parent.f rame[1] works.
IE only code, gotta love it.
>What is "position"?

An ID (yeah, I know, bad idea to have more than one element with the same
ID, I'll fix that next).
It's not just a "bad idea" as it is invalid HTML code and when presented
with invalid HTML anything goes.
>>This works under Win200 and 6.0.2800.1106.

But not under WinXp and 6.0.2900.2180.

Does anyone know what IE might be looking for?
Not even MS is sure what IE might be looking for about 90% of the time.

Heh. But I need to find out what it wants this time...
Start with validating the HTML to make sure it isn't a multiple ID issue
as IE may make a collection of same-ID'ed elements (I don't remember to
be honest). Then, start debugging with alerts and find out what is
causing the error.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 31 '06 #5
"Kevin Darling" <kd******@basit .comwrote:
J. Moreno wrote:
pages = window.parent.f rames.item(1).d ocument.all("po sition");

This works under Win200 and 6.0.2800.1106.
But not under WinXp and 6.0.2900.2180.

Didja already try debugging to see what fails? Like an alert and
removing the ending object each time until it works?

alert(window.pa rent.frames) etc.

What error did you get, btw? No permission or ?? W2K and XP seem
to sometimes have different security models.
Yeah, it was a security problem -- MS's silly "Mark of the Web" wasn't on
the main page.
Also, personally, I'd name the frames so you don't have to do the
frames.item(1) thingie. Ooops, never mind, I forgot that you said it
was old code.
The frames were already named. Which means I can use
window.parent.f rames.frameName , I just checked and IE recognizes it (both
on my development machine and when working).

--
J. Moreno
Jul 31 '06 #6

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

Similar topics

2
6654
by: Chris New | last post by:
G'Day All I am having trouble dynamically assigning a value to a table's cell from one frame to another frame. I've created a website that is primarily viewed in a frameset consisting of 2 frames - a navigation frame (navFrame) at the top and a contents frame (mainFrame) on the bottom. In all instances, the mainFrame displays a single...
1
4044
by: Gregor | last post by:
I'm having problems accessing a global array variable from within a function. I have something like this: ------------------------------------ var detail = new Array( 20 ); detail = "hello"; function ShowDetail( ) { top.frames.document.clear(); top.frames.document.write("<html><body>");
8
1900
by: Frédéric Mayot | last post by:
Hi, I have an HTML page like this : --- test.html <html> <body> <form> <iframe id="frametest" name="frametest" src="iframe.html"></iframe> <select multiple ondblclick="alert(frametest.v);"></select>
2
1987
by: Jeremy Gollehon | last post by:
I'm trying to help a friend out but couldn't find an answer so thought I'd post here. Is it possible to access the frame window at http://www.5460.net (a chinese site)? We're trying to get the DIV elements from its DOM. We were trying: alert(document.frames.document.getElementsByTagName('DIV').length); with no luck. Thanks for any help!
3
8332
by: Greg | last post by:
Javascript Folks, I am relatively new to javascript and am working on a script where I want to utilizes a couple of iframes and format text in them. I have run into a problem with getting the following code to work in mozilla. It seems to work in ie. Eventually I will be replacing the H1 node with a table until I can get the H1 node to...
3
1302
by: David Brewster | last post by:
Hey everyone. I am just getting into .NET (2003) now - I've been working in VB6 for some time now, so my question may seem pretty low level for some - but bare with me ok? I have a form with 2 frames in it "Contents", "Main", and "Header". Along the side frame (Contents), I have a navigation type menu. Now when one of those buttons get...
19
10527
by: k.karthikit | last post by:
Hello all, In some hidden variable (<input type="hidden" name="hiddenId" value="test" /> ,i stored some value.I accessed the value "test" using var id = document.getElementById( 'hiddenId' ); It is working fine in IE. But in Mozilla Firefox , null value is returned.Is there any way to use hidden variables compatible to browsers......?
0
1179
by: Andrew Bullock | last post by:
Hi Can someone give me some pointers as to how to access frames from an AVI file as quickly as possible. If it makes any difference... I first need to access them sequentially (forward) as quickly as possible, but then I need to be able to access them in no particular order. This second step does not have the requirement of speed.
3
4911
by: thompson_38 | last post by:
I am currently working on a C# application that uses an axWebBrowser control which displays HTML pages. This is being done to reuse an existing web application which resides on a client's computer. I have created a resource .dll linking in all of the HTML, images and JavaScript pages in the old project. Using the res://mydll/homepage.htm,...
0
7692
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
7601
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
7913
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. ...
0
8117
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...
0
7962
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...
0
6274
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...
1
5496
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
3651
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...
0
931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.