Use sessions to save popup state.
When the user clicks the link to open the sub site, you need to make an asynchronous javascript call to the parent server, which will record this user by opening a window on the sub site. OR open a link on a page that stores the following session information and returns a Location header.
(Note that I am using php, $ _SESSION [...] is a user-defined array of data stored between requests)
$_SESSION['inChildSite'] = true;
When the user logs out of the parent site, this value is checked again either by an asynchronous javascript call, or by logging out of the script.
if ($_SESSION['inChildSite'] ==true ) echo "<script>window.open(...)</script>"
Then display the exit child window. Make sure you turn off the session variable when you log out.
Warrior, profit.
source share