Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Force Save

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

How do I force an user to save the page when they edit some fields and click on other links.I want a dialogue box or some msg to popup to warn the user to save the page.Can this be done in struts?
 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Javascript!
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do u do in JS
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys....any replies?
 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the onChange() event for text boxes & onClick() event for dropdowns, list boxes etc... to set a JS variable or html field. Then check this before the submit!

If you're not familiar with JS you need to learn it to use this method - remember this is a struts forum!

good luck!

P.S using JS requires the browser setting to be enabled otherwise it won't work!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic