Detect browser window closing event in Firefox –

I want to execute some java script code when I close the browser. The following code is executing in I.E. But I want to execute in Firefox and Netscape.

<html>
<head>
<script language=”JavaScript”>

function doUnload(evt)
{
var e = (window.event) ? window.event : evt;

if (e.clientX < 0 && e.clientY < 0){
{

alert(“window closing….”);

}
}

Leave a Reply

%d bloggers like this: