471,616 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

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.frames.item(1).document.all("positio n");

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 2220
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.frames.item(1).document.all("positio n");
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.javascript 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.frames.item(1).document.all("positio n");

What does item(1) refer to?
An individual frame. In FF window.parent.frame[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.frames.item(1).document.all("positio n");

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.parent.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.frames.item(1).document.all("positio n");
What does item(1) refer to?

An individual frame. In FF window.parent.frame[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.javascript 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.frames.item(1).document.all("positio n");

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.parent.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.frames.frameName, I just checked and IE recognizes it (both
on my development machine and when working).

--
J. Moreno
Jul 31 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Chris New | last post: by
1 post views Thread by Gregor | last post: by
8 posts views Thread by Frédéric Mayot | last post: by
2 posts views Thread by Jeremy Gollehon | last post: by
3 posts views Thread by David Brewster | last post: by
19 posts views Thread by k.karthikit | last post: by
reply views Thread by Andrew Bullock | last post: by
3 posts views Thread by thompson_38 | last post: by
1 post views Thread by XIAOLAOHU | last post: by

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.