I would suggest you the below html tags for your problem. In your case the unload event is working everytime you try to change page rather than close the window. It means you are terminating a process and logging people out.
The code is as follows :
HTML Code:
<body onUnload="popKill()">
</body>
</html>
<script language="Javascript">
function popKill()
{
window.open('kill.asp','popup','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=10,height=10');
}
</script>
Then the page opened is call kill.asp which looks like:
<html>
<body>
<% Session.Abandon %>
<script language="Javascript">window.close()</script>
</body>
</html>
This code will cancel the onload or onbeforeunload event.
Bookmarks