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;
     }
//-->
</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

Reply via email to