You are here: irt.org | FAQ | JavaScript | Window | Q1048 [ previous next ]
Use the window handle:
<script language="JavaScript"><!-- var windowHandle = -1; function myOpen() { windowHandle = window.open('page.htm','windowName','width=640,height=480'); } function myClose() { if (windowHandle != -1) windowHandle.close(); setTimeout('self.close()',1000); // 1 second delay before closing self } //--></script>