alert(window.parent.frames.toolbar.location)
the alert is undefined in Firefox, IE it work fine.
alert(window.parent.frames.toolbar.location)
the alert is undefined in Firefox, IE it work fine.
In Chrome and FF there's a difference if toolbar
is either an id
or a name
of an (i)frame
. .frames.id
will refer to an actual (i)frame element (which doesn't have location
property), .frames.name
refers to the window
within an (i)frame element. In IE both refer to the window
within (i)frame.
A quick-fix would be to add also/use only name="toolbar"
attribute to your (i)frame element.
Use this
alert(window.parent.frames[0].toolbar.location);
That should work.
As my comment said. window.frames
is a list containing all frames in a window
. You need to select the correct window, which I guess is the one with index 0
.