asifshahzad said:
Assalam-O-Alaikum
Brother try following code
__________________________________________________ ____________
<html>
<head>
<title>closer.htm</title>
<script type="text/javascript">
function window.onload()
{
window.attachEvent("onbeforeunload", Close);
}
function Close()
{
return 'Are you sure you want to close my lovely window?'
}
function closer() {
alert("This window is about to close.");
}
</script>
</head>
<body onbeforeunload="closer()">
</body>
</html>
__________________________________________________ ____________
This code will alert you when you click on close page
You simply have to do that when user click on the close button redirect that user to a page that updates recored in the database.
NOTE: This code works only in IE
Bookmarks