Bonjour
the problem to know when the browser is closed, or the computer is "killed"
or to know when the client is sleeping on his chair, or is drinking a coffee
or etc ... is very old, and don't forget that the protocol HTTP is " fire
and forget ..."
so, I can be in error, there is not "elegantes manieres" to know this kind
of events !!
for me, my solutions are :
1) you send to the client a little applet, invisible, and this applet knows
very well when the IE or Netscape is closed and at this time this applet can
send something to a servlet ..
2� you have to code a listener HttpSession and with a time out you decide in
the case of no activities ( 5 mn for exemple ) to garbage all objects
relatifs au client ..


----- Original Message -----
From: "Abhishek Vishwakarma" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 3:46 PM
Subject: Re: Browser Close ( Problem Again ) !!


> Hi,
>
> I tried with setting the window.location property, but didnt worked.
> Plus i tried with <BODY> tag, but the problem is the MyUnload() is called,
but
> the form submit or servlet redirection is not happening... ???
>
> <BODY onbeforeunload='MyUnLoad()'>
>
> I will make my problem more clearer...
> I want whenever a browser window is closed a servlet should be called
which does
> some cleaning-up/post processing operation... !!
>
>
> regards,
>
> abhishek
>
>
>
>
>
>
>
>
>
> Alberto Imedio <[EMAIL PROTECTED]> on 08/29/2001 11:00:49 PM
>
> Please respond to "A mailing list for discussion about Sun Microsystem's
Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>
>
>
>   To:          [EMAIL PROTECTED]
>
>   cc:          (bcc: Abhishek Vishwakarma/Satyam)
>
>
>
>   Subject      Re: Browser Close !!
>   :
>
>
>
>
>
>
>
>
> Ummm, ummm!!!....
>
> If you're talking about a browser window  there is no way to detect
browser
> close event, because there is no close event.
> If you are managing a new window, opened from a browser window, you can
> check the property "isclosed" but it is not an event....
>
> Am I Right??
>
> -----Mensaje original-----
> De: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]En nombre de
> Abhishek Vishwakarma
> Enviado el: miercoles, 08 de agosto de 2001 14:48
> Para: [EMAIL PROTECTED]
> Asunto: Browser Close !!
>
>
>                                               Placed At :
>
>
>
> Hi,
>
> Most of you must have done this...
> Plz. can anybody tell me how to detect browser close event in
Javascript...
> And how to call a servlet on a Brower close...??
>
>
> I tried out some thing.... but it didnt solved my purpose !
>
> <html>
> <head>
> <SCRIPT language=Javascript>
> <!--
>      function testfn()
>      {
>          alert("Before Submit");
>           document.myfrm.action="/exam/servlet/PasswordReminderServlet";
>           document.myfrm.submit();
>           return true;
>      }
> file://-->
> </script>
> </head>
>
> <body onUnload="testfn()">
> <form name="myfrm" method="post">
>     Hello World
> </form>
> </body>
> </html>
>
> ****************************************************
> It shows the alert on window close... but my servlet is not called...
??????
>
> Plz can anybody put some light on this....!
>
> regards,
>
> abhishek
>
>
___________________________________________________________________________
> 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
>
>
___________________________________________________________________________
> 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