Friday, September 11, 2009

Javascript Popup - close after redirect

If you want to redirect the popup window to another location (a page or a file download) and then close the window, you can simply use the following javascript.
<script type="text/javascript">
    window.opener.location = "new_page.htm";
    window.close();
</script>

1 comment: