You are here: irt.org | FAQ | JavaScript | Window | Q1330 [ previous next ]
Use an array:
<script language="JavaScript"><!-- openWins = new Array(); curWin = 0; function openWin(page) { openWins[curWin++] = window.open(page,'_blank'); } function closeAll() { for(i=0; i<openWins.length; i++) if (openWins[i] && !openWins[i].closed) openWins[i].close(); } //--></script>