I know many of you is looking to how to handle the browser close event in both Firefox and IE. I looked everywhere on the net until I found this script I test it on Firefox 3.01 and IE 7.0 and it works, I hope it work with you too
<html>
<head>
<title></title>
</head>
<body onbeforeunload=”alert(‘Closing’);”>
</body>
</html>