[html5] Setting field in a different frame from javascript

Ian Hickson ian at hixie.ch
Mon May 12 15:28:02 PDT 2014


On Thu, 8 May 2014, Larry Martell wrote:
> On Thu, May 8, 2014 at 4:33 PM, Peter Borbely
> <pborbely at fairfaxmedia.com.au> wrote:
> > I suspect that the frame's DOM isn't loaded yet at the time your script is
> > executed
> 
> Thanks, but I figured this out. I had to reference parent.frames instead 
> of window.frames.

Note that "window.frames === window" and "parent.frames === parent". 
"frames" is just a synonym for "window". In fact you could write 
"frames.window.self.foo" and it would be precisely the same as 
"self.frames.window.foo" or any other combination: "self", "window", and 
"frames" are all just ways to refer to the self-same Window object.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the Help mailing list