View Full Version : want to call javascript on browser close

03-20-2009, 09:44 AM
the browser i use is mozilla firefox.
i want to call a function when someone closes firefox.
but without using body unload event. because that is called even if i move to any other page.

can someone pls tell me how i can do it?
please reply.

thank you.

Philip M
03-20-2009, 11:43 AM
If you mean call a function when the user closes his browser, that is impossible.

Pressing "alt+f4" or clicking on the "X" button, just closes the window without being prompted or alerted to anything. And what about people who have Javascript disabled?

See also:-


Quizmaster: Which "C" is a former German prisoner of war camp which is now used as a scout hostel?
Contestant: Auschwitz.