i open a html page with a js popup
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'foobar','height=575,width=950');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
<a href="index.php" onclick="return popitup('foobar.html')">Link to popup</a>
Now I got some Links in my Popup and I want to close the Popup onclick of my link AND OPEN LINK IN THE OLD WINDOW. With old window I mean the browser window who calls the popup. Is this possible?
In the popup, add this to the onclick event of your link:
window.opener.location.href = "link_in_old_window.htm";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With