i have the following javascript
<script type="text/javascript">
window.onbeforeunload = function (beforeclose) {
var message = 'Are you sure that you want to close the greenhouse!!!';
if (typeof beforeclose == 'undefined') {
beforeclose = window.event;
}
if (beforeclose) {
beforeclose.returnValue = message;
}
return message;
}
</script>
This method is an alert for the user before closing. What i want is to use a method after closing the window. Like: "When the following page is closed, do something". Is there not something like onafterunload?