W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2007

Re: OnClose handler

From: Master Br <master@sitesbr.net>
Date: Wed, 25 Apr 2007 11:49:29 -0300
Message-ID: <462F6A79.3040900@sitesbr.net>
To: Michael Kyzyma <miha.urai@gmail.com>
CC: www-dom@w3.org

An event related to what you suggest is onunload .

Try  this code :

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>On Unload</title>
</head>
<body onunload='javascript:window.alert("Bye bye");'>
</body>
</html>

I tested it with sucess on Firefox and Internet Explorer:
When closing the browser, an alert says "Bye bye".

Unfortunatelly, Opera failed to do this.

Regards

Michael Kyzyma escreveu:
> Why in DOM is not entered a handler of the event of the closing the 
> brouser?
> ------------------------------------------------------
> Best regards
> Michael Kyzyma
Received on Wednesday, 25 April 2007 14:49:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT