BTW, is there a single JavaScript event to accomplish this? It would the complement of 
'onLoad', something like 'onNavigate' or 'onLeave'....

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 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?

John

-----Original Message-----
From: Jaishankar Jayaram <[EMAIL PROTECTED]>
Date:         Thu, 28 Feb 2002 14:12:10 -0500
To: [EMAIL PROTECTED]
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
>

--

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup



===========================================================================
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

Reply via email to