Hi, I am working on a J2EE Project with JSP, EJB and Servlets. I have a requirement which requires me to throw a warning message when a user changes some values in a screen and tries to go out of the screen without saving it. There is a catch here. I have implemented the left menu bar in a separate JSP and have included it in every other screens. So if the user modifies any of the screen values and then clicks the left menu bar, how will I be able to track the changes made in the screen values? If any of you have any suggestions, please help me out. Thank you in advance.
You could also use the onBeforeUnload handler of the page body (might be named slightly differently), which will be invoked before a page gets replaced. From inside it you can prevent a new page from being loaded if necessary. But you'd still need to keep track of altered fields, as suggested above.
Joined: Dec 30, 2003
Thanks a lot friends
subject: Detection of changes in values of JSP Elements