javascript thread: recognizing window environment...
In the code for the popup/frame page, simply add:
if(top.location == self.location)
{
// got a popup
}
else
{
// got an iframe
}
this checks if the location of the highest frame in the window is the same
as the frame's location i.e. if the frame is the highest frame.
Hope this helps.
Philip
> On my site, I have a series of "user information"
> pages ("change your password", "view your profile",
> etc.) that appear in one of two distinct environments:
>
> 1. These pages either appear within an <iframe> on a
> main page...
> 2. or, they are launched as 500 x 500 pop up windows.
>
> Is there a way for javascript to recognize whether a
> given window is within an iframe or out there as a pop
> up? if this explanation of mine makes sense, i'll be
> surprised. let me know if you need clarification :)