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








yilmaz <[EMAIL PROTECTED]> on 08/29/2001 11:07:36 PM

Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>



  To:          [EMAIL PROTECTED]

  cc:          (bcc: Abhishek Vishwakarma/Satyam)



  Subject      Re: Browser Close !!
  :








Though it is not very related JSP :)
<script>
function testfn {
location="the_address_of_your_servlet";
}
</script>
regards
----- Original Message -----
From: "Abhishek Vishwakarma" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 8:48 PM
Subject: 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: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to