OnClose

Jul 23, 2005

when the user goes to my site, and them closes the window, using "X" window
decoration, i would like to log him out

is it possible to add an onClose to current window ? is so how ?

View 6 Replies


ADVERTISEMENT

Gecko DOM Window Onclose Event ?

Dec 3, 2005

I tried to use it but i guess i failed... here is a code:

<html>
<head>
<title></title>
<script type="text/javascript">
function closedWin() {
confirm("close ?");
return false; /* which will not allow to close the window */
}
if(window.addEventListener) {
window.addEventListener("close", closedWin, false);
}

window.onclose = closedWin;
</script>
</head>
<body>

</body>
</html>

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved