The event in question is onUnload (window object, body tag) Take a look on the html I joined.
unfortunatly, the onchange events aren't fired when declared in <script> tags. If anyone can explain me why ... Thursday, February 28, 2002, 11:56:50 PM, tu �crivais: JV> BTW, is there a single JavaScript event to accomplish this? It would the complement of 'onLoad', something like 'onNavigate' or 'onLeave'.... JV> It must be possible because for example on the CitibankOnline site, once you're logged in, whenever you point your browser to somewhere else (be it through a link on the currently displayed page JV> or by typing a URL directly in the browser), the citibank page detects it and pops up a dialog. Maybe it's only possible in IE. Anyone knows? JV> John JV> -----Original Message----- JV> From: Jaishankar Jayaram <[EMAIL PROTECTED]> JV> Date: Thu, 28 Feb 2002 14:12:10 -0500 JV> To: [EMAIL PROTECTED] JV> Subject: Re: Leaving the JSP page >> This is a javascript question, more appropriate for a list dealing in it, >> but here's something that might work: >> >> <!-- scripts type="tetx/javacsript"> >> >> var glbBlnNothingthingChanged = true; >> >> </scripts --> >> >> Set the onchange attribute of all form fields to set the global boolean to >> false: >> >> <input type="text" .... onchange="glbBlnNothingthingChanged = false;"> >> >> and the onclick of all links o return the boolean: >> >> <a href="xyz.jsp" onclick="return glbBlnNothingthingChanged" target="_blank">Click >me</a> >> >> >> > From: sanjib B <[EMAIL PROTECTED]> >> > Reply-To: A mailing list about Java Server Pages specification and reference >> > <[EMAIL PROTECTED]> >> > Date: Thu, 28 Feb 2002 12:00:50 -0700 >> > To: [EMAIL PROTECTED] >> > Subject: Leaving the JSP page >> > >> > Hi All, >> > In my JSP page I have some editable fields which the user can edit but before >> > applying those changes to database updates, if the user clicks some other link >> > or wants to leave the page I want to prevent the user from doing so and wnats >> > to show a message box. If the user presses "Ok" and want to discard the >> > previous edits then only I want to allow the user to leave the page. How do I >> > do so? any idea ?? >> > >> > thanks >> > sanjib >> > >> > =========================================================================== >> > 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://archives.java.sun.com/jsp-interest.html >> > http://java.sun.com/products/jsp/faq.html >> > http://www.esperanto.org.nz/jsp/jspfaq.jsp >> > http://www.jguru.com/faq/index.jsp >> > http://www.jspinsider.com >> >> =========================================================================== >> 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://archives.java.sun.com/jsp-interest.html >> http://java.sun.com/products/jsp/faq.html >> http://www.esperanto.org.nz/jsp/jspfaq.jsp >> http://www.jguru.com/faq/index.jsp >> http://www.jspinsider.com >> JV> -- JV> _______________________________________________ JV> Sign-up for your own FREE Personalized E-mail at Mail.com JV> http://www.mail.com/?sr=signup JV> =========================================================================== JV> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". JV> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". JV> Some relevant FAQs on JSP/Servlets can be found at: JV> http://archives.java.sun.com/jsp-interest.html JV> http://java.sun.com/products/jsp/faq.html JV> http://www.esperanto.org.nz/jsp/jspfaq.jsp JV> http://www.jguru.com/faq/index.jsp JV> http://www.jspinsider.com -- Cordialement, dave mailto:[EMAIL PROTECTED] =========================================================================== 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://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
