Hi,
Our application is built on Applet-Servlet communication. I define things to
be done on browser close event in the destroy() method of the applet. In my
case i send a logout msg to the servlet on browser being closed.


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Shashank Phadke
Sent: Saturday, February 05, 2000 11:46 AM
To: [EMAIL PROTECTED]
Subject: FOLLOWUP : Browser close event


Hi all --

Just thot of sharing this with you all ::

On NS the unload event does get called (though its documented as "not always
assured"). You need to write you own event handler and capture the unload
event for the window. Within the callback you can process some information -
like sending the request back.

What doesnt work on NS :

* putting up an alert message box in the callback.
* opening a new window with *relative* URL.

It was the second part which made me think unLoad just doesnt get called at
all ! I have tested this on NS 4.5+ - wonder if there is any dependancy on
prev versions of the browser.

Nick, using applets is a no-no in our case - but yes, seems a good solution.

Shashank

>From: Nicholas Whitehead <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: OFFTOPIC : Browser close event
>Date: Fri, 4 Feb 2000 04:49:59 -0800
>MIME-Version: 1.0
>Received: from [204.160.241.28] by hotmail.com (3.2) with ESMTP id
>MHotMailBA65185D0031D820F3D4CCA0F11C941E0; Fri Feb 04 23:12:31 2000
>Received: from mail (mail.java.sun.com [204.160.241.28])by
>mail.java.sun.com (8.9.3+Sun/8.9.3) with ESMTP id WAA14725;Fri, 4 Feb 2000
>22:58:36 -0800 (PST)
>Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d)
>with          spool id 5382266 for [EMAIL PROTECTED]; Fri, 4
>Feb 2000          04:54:37 -0800
>Received: from web108.yahoomail.com (web108.yahoomail.com [205.180.60.75])
>by          mail.java.sun.com (8.9.3+Sun/8.9.3) with SMTP id EAA04802 for
>        <[EMAIL PROTECTED]>; Fri, 4 Feb 2000 04:54:32 -0800
>(PST)
>Received: (qmail 25935 invoked by uid 60001); 4 Feb 2000 12:49:59 -0000
>Received: from [192.193.196.24] by web108.yahoomail.com; Fri, 04 Feb 2000
>        04:49:59 PST
>From [EMAIL PROTECTED] Fri Feb 04 23:13:01 2000
>Message-ID:  <[EMAIL PROTECTED]>
>Sender: "A mailing list for discussion about Sun Microsystem's Java
>      Servlet API Technology." <[EMAIL PROTECTED]>
>
>We use very small applets. When the browser closes, it
>fires off a message to the servlet.
>
>//Nicholas
>
>--- Shashank Phadke <[EMAIL PROTECTED]> wrote:
> > ** Delete if you dont do client side scripting in
> > servlet app dev ***
> >
> > Hello --
> >
> > I know many of us have stumbled across this one ..
> > but is there any way I
> > can catch the browser window close event in both IE
> > and NS. I have found
> > that there is an unload event on the contained
> > frames getting called in IE
> > .. but not in NS.
> >
> > Is there anything other than 'unload' event which
> > can be trapped before the
> > browser shuts down and help me send appropriate
> > request to my servlet ?
> >
> > Thanks for any inputs ..
> >
> > Shashank
> >
>______________________________________________________
> > Get Your Private, Free Email at
> > http://www.hotmail.com
> >
> >
>___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
>http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
>http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> > http://www.lsoft.com/manuals/user/user.html
> >
>
>=====
>"Suzie, Suzie, Suzie, Suzie
>Suzie, Suzie Greenberg"
>Suzie Greenberg, Phish
>
>--
>Nicholas Whitehead
>__________________________________________________
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
>http://im.yahoo.com
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to