prova questo
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
<head>
<title>Test</title>
<script type="text/javascript">
// <![CDATA[
var stackPopup = new Array();
function openPopup(page, title, params) {
numPopup = stackPopup.length;
stackPopup.push(numPopup);
stackPopup[numPopup] = window.open(page, title, params);
}
function closeAllPopup() {
if (stackPopup.length == 0) return;
for (i=0; i<stackPopup.length; i++) {
stackPopup[i].close();
}
}
window.onunload = function() {
closeAllPopup();
}
// ]]>
</script>
</head>
<body>
Apri un pò di popup
e poi Fai un refresh (o premi F5)
</body>
</html>
Ciauz