From: J. Moreno on
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,

--
J. Moreno
From: Randy Webb on
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
From: J. Moreno on
Randy Webb <HikksNotAtHome(a)aol.com> wrote:
> 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?

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
From: Kevin Darling on

J. Moreno wrote:
> 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

From: Randy Webb on
J. Moreno said the following on 7/31/2006 12:08 PM:
> Randy Webb <HikksNotAtHome(a)aol.com> wrote:
>> 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?
>
> 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/
 |  Next  |  Last
Pages: 1 2
Prev: Help needed...js error
Next: ChatZilla - Pet (Bot)