Mihir,

  Assuming that you want to pop up a message only when the user changes the
values ..

   You can make use of client side javascript function onChange() which gets
fired when there is any change in the data from the initial value. This is
the easiest way I can think of. But the drawback would be u will have to
invoke this from any textbox that is on the form or rather for those values
where the values are changed & you want to check.

  assuming that there are two text boxes the following code would be useful.

 <script language="Java">

  function popMessage()
  {

    alert("are you sure you want to save chnages");
    // you can add ur logic here.. to do next required action
    return;
   }

 </script>
 <body>
 <input type="text" name ="text3" onChange="javascript:popMessage()">
 <input type="text" name ="text2" onChange="javascript:popMessage()">
 </body>


Regards,
Divakar

-----Original Message-----
From: Mihir Sahu [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:08 AM
To: [EMAIL PROTECTED]
Subject: Cancelling of changes in a form


Hi all,
    Is there anyway we can know if anyvalue in the jsp form has been
changed or not, depending on which we can ask the user if he really
wants to cancel his request.  I have a Jsp form(with data retrieved from

many tables) which call the javascipt function to pop of the message of,

if he really wants to cancel the changes.  I only want that message to
pop up when any values have changed in the form(from what was
retrieved).   Also there are two pages, which the user can swap, so I
have to know if data has been changed in either of the pages.  Can
anybody suggest any way to know that the data in the form has changed(I
do not want to again check with existing data).
Any help is really appreciated.  Thanks
Regards
Mihir

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