javascript window.open detect close code example
Example: window.open javascript auto close
<script type="text/javascript">
function allOn(){
var win = window.open('http://www.yahoo.com','windowname','width=1,height=1,left=5,top=3');
setTimeout(function() { win.close();}, 3000);
}
</script>