Skip to content

Instantly share code, notes, and snippets.

@huydx
Created July 30, 2013 07:04
Show Gist options
  • Save huydx/6110881 to your computer and use it in GitHub Desktop.
Save huydx/6110881 to your computer and use it in GitHub Desktop.
check pop-up window is closed or not
var win = window.open('foo.html', 'windowName',"width=200,height=200,scrollbars=no");
var timer = setInterval(function() {
if(win.closed) {
clearInterval(timer);
alert('closed');
}
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment