From: Garrett Smith on
nick wrote:
>> document.frames('my_iframe')
>
> Argh, window.frames, not document.frames. You know what I meant.
I got your point, yes, but also I noticed you used call operator there.
That won't work cross browser consistently.

So instead of document.frames(0), use frames[0] or window.frames[0].
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: nick on
On Apr 21, 10:00 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> I got your point, yes, but also I noticed you used call operator there.
> That won't work cross browser consistently.
>
> So instead of document.frames(0), use frames[0] or window.frames[0].

Wow, yes. I meant to use the array index operator there. Thanks for
catching that; I need to type more slowly.
From: Garrett Smith on
nick wrote:
> On Apr 21, 10:00 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>> I got your point, yes, but also I noticed you used call operator there.
>> That won't work cross browser consistently.
>>
>> So instead of document.frames(0), use frames[0] or window.frames[0].
>
> Wow, yes. I meant to use the array index operator there. Thanks for
> catching that; I need to type more slowly.

Not array index operator. It is called "bracket notation property
accessor operator", aka "square bracket property accessor".

Incidentally, call operator an IE-ism that works in implementations that
have copied it, for example:
var f = document.forms,
foo = f(0)(0);

Opera copies IE-ism's and this is one of them.
alert(frames(0));
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Garrett Smith on
Garrett Smith wrote:
> nick wrote:
>> On Apr 21, 10:00 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
[...]
>
> Incidentally, call operator an IE-ism that works in implementations that

Sorry, the call operator is not an IE-ism.

Using the call operator to access a property of a dom collection is an
IE-ism.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: nick on
On Apr 21, 10:24 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:

> Not array index operator. It is called "bracket notation property
> accessor operator", aka "square bracket property accessor".

Shows how much I know. In my mind I call it []. ;)