Forum Moderators: open
when you click a link, a new window pops up, and when you click "front cover" the window closes. well, I would like the window to close, AND target the window behind to go to the main page, or open a new window with the main page on it. (in case someone had left the main page, or closed the window)
any ideas?
thanks
[edited by: tedster at 1:09 am (utc) on June 19, 2003]
In the new window, you'll need to add an onclick event handler to the link, something like
onclick="
if(top.window.opener)
{
top.window.opener.location='anypage.html';
}
else
{
open('anypage','',[your featurelist here]);
}
top.window.close();
"
that should do it.
anyway, if the user wants to go back to the main page for any reason, then the pop-up would need to close, and the main browser window behind should go to the index page (if it isn't there already.
as for opening a new window... that is only if they accidentally or purposely closed the main browser window. Clicking "cover page" would have to open a new window and go to the index.
I'll give the code a try. Thanks!