A
Andrew Poulos
How can a page know which frame in a frameset it is in?
Andrew Poulos
Andrew Poulos
Andrew said:How can a page know which frame in a frameset it is in?
window.name
gives you the name of the window or frame thus whatever.html when loaded in
<frame name="frameName" src="whatever.html">
can check
if (window.name == 'frameName')
That obviously does not help with unnamed frames but then you would need
to walk the frames and compare each to window to find out which frame
you are in.
Andrew said:If the frames are unnamed and I do a comparison, say,
window.frames[1].location == self.location
that would "fail" if the same page was loaded into more than one frame.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.