Forum Moderators: open
When opening a new "target" window, it opens a new window while leaving the old window still open. If the new "target" window exists, it simply re-opens that window, not a new one ...that's what I want to do, but I want to close the old window.
the scenario: MainPage has a link that opens a new window named "New1". Window New1 has a link that opens a new window named "New 2". Now I want a link on page New 2 to open a new page in window "New1" (which is already open) while at the same time closing itself (window "New2").
Is there any way to do this [in the "HREF" tag] ...or any way at all?
Joseph
PS: the admin in html/browser forum offered this approach:
<a href="#" onClick="window.opener.parent.location='newpage.html';window.close();">
but I couldn't get that to work. He suggested I try this forum.
Joseph
<a href="#" onClick="window.opener.parent.location='newpage.html';window.close();">
<a href="#" onClick="window.opener.location='newpage.html';window.close();">
<a href="#" onClick="window.opener.parent.location.href='newpage.html';window.close();">
<a href="#" onClick="window.opener.parent.location='newpage.html';window.close(); return false;">
<a href="#" onClick="window.opener.parent.location='newpage.html';window.close(); return true;">
I get nothing ...no error messages, nothing. Nothing at all happens
If the user has set permissions appropriately in Moz's Preferences, a script can resize and/or move the main window, but not close it.