This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Tracking JSP page changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Tracking JSP page changes" Watch "Tracking JSP page changes" New topic
Author

Tracking JSP page changes

pramodh somashekara
Ranch Hand

Joined: Jan 30, 2006
Posts: 62
Hi All, We have a JSP page displaying data fetched from tables. Users can edit it and if they click on link for next page without saving it, we have to prompt the user whether to save it or not.

If they say 'yes', we have to save otherwise user can go to next page. NOw the question is, how to track changes in JSP page for all fields( I have around 60 fields in my page).

pramodh
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Once the page is sent to the browser, the job of JSP is done. You'll need to use JavaScript for that.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
In JSP, you can't track of the changes to the fields. Using javascript onchange event you can do some logic(to identify the changed rows) and trigger it on your next button.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tracking JSP page changes
 
Similar Threads
Session or DB
JSP Form data lost while back to same Action (struts 2)
multiple forms in struts
Lost update problem and web apps
Struts Issue - Repopulating a Form Bean