Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / July 2006



Tip: Looking for answers? Try searching our database.

Accessing Frames

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J. Moreno - 29 Jul 2006 01:30 GMT
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("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?

Thanks,

Signature

J. Moreno

Randy Webb - 29 Jul 2006 02:06 GMT
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("position");

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.

Signature

Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

J. Moreno - 31 Jul 2006 17:08 GMT
> J. Moreno said the following on 7/28/2006 8:30 PM:
> > Hi,
[quoted text clipped - 5 lines]
>
> 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.
> >
[quoted text clipped - 3 lines]
>
> 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...

Signature

J. Moreno

Randy Webb - 31 Jul 2006 19:30 GMT
J. Moreno said the following on 7/31/2006 12:08 PM:
>> J. Moreno said the following on 7/28/2006 8:30 PM:
>>> Hi,
[quoted text clipped - 6 lines]
>
> 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.
>>>
[quoted text clipped - 4 lines]
>
> 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.

Signature

Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Kevin Darling - 31 Jul 2006 18:06 GMT
> pages = window.parent.frames.item(1).document.all("position");
>
> 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
J. Moreno - 31 Jul 2006 23:45 GMT
> > pages = window.parent.frames.item(1).document.all("position");
> >
[quoted text clipped - 8 lines]
> 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).

Signature

J. Moreno

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.