[imp] breaking out of a frame IMP 2.3.7

Chuck Hagenbuch chuck@horde.org
Tue, 13 Mar 2001 10:05:42 -0500


Quoting Paul Juliano <paul@edsamail.com.ph>:

> I'm running the pages of IMP 2.3.7 inside a frame, except for the 
> login page, in order to have banner frames at the top of the pages.  
> I only know how to break out of the frame when the user logs out by adding a
> target="_top" at the logout link.  Problems occur when IMP determines
> that the session is no longer valid (session timeout or when a user logs
> out then clicks on back).  It doesn't break out of the frame and when the
> user logs in, there are now two banner frames on top.  What can I do so
> that when the session is not valid, it breaks out of the frame and goes
> to the login page?

You'll need to add some javascript to the login page that checks to see if it's 
in the top frame, and if it isn't, sets the top frame to itself. I'm forgetting 
the exact syntax of this right now (something like if (window.top.location !
= 'login.php') window.top.location = self.location), but it should work fine.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"Live, from Washington, where the doctors were telling us what they did, and
 did not, do with Vice President Cheney." -Dan Rather