BWGames wrote on 03 mei 2004 in comp.lang.javascript
:
I'm looking for a way to have a message box pop up as a page is
loaded, then, when the user clicks OK on the message box, for the
window to close.
It will be a popup window, so there won't be any "This webpage is
trying to close this window" errors...
<script type="text/javascript">
alert("Please click OK to close window");
window.close();
</script>
IE6 tested
= or nicer ============
<body onclick="window.close();"
onload="window.resizeTo(300,200);">
Please click this window anywhere to close
</body>
IE6 tested
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)