View Full Version : reference to array in parent frame

May 13th, 2003, 01:09 PM
Trying to access an array in a parent frame, e.g.

i = parent.parent.h[0];

Works fine under IE 6.0, but not in Netscape (v7.02) - Netscape browser hangs at this point!

Any way around this? Thanks!

May 13th, 2003, 06:12 PM
What does your frame layout look like?
Just wondering because the code you posted reaches for the parent's frame parent frame (a grandfather ;)), and not just the parent of the actual frame where this snippet is located.

May 14th, 2003, 05:14 AM
if the parent frame is the outermost window:

i = top.h[0];

May 14th, 2003, 01:27 PM
Thanks for you help guys - I think I've fixed it myself. Looks like Netscape is more fussy than IE. Netscape doesn't like script stuff after FRAMESET tags, whereas IE doesn't seem to mind. If I put the variable declarations before the FRAMESET tags, child frames can find them in both Netscape and IE.