I agreed with all of you. As much as we had tried to convince our top level people on several occassions that user should be warned when leaving the page without saving the modified data. But it was a majority rule that all our clients wants it to be this way.
We developers have no choice but to implement what they requested. So the bottom line is that our market drive us not the other way around so we have to fulfill their needs/requirement and tried to solve this problem. Much appreciated. Nancy. --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: > This is a good point that Scott makes... I've implemented this a > number > of times myself, and in all cases I do "dirty data checking" to be > sure > (a) I don't prompt the user it nothing has changed and (b) I DO > prompt > them if ANYTHING has changed. > > Frank > > Scott Piker wrote: > > This is more of a design issue, but I personally hate it (and > find it > > dangerous in some cases) when anything is "automatically" saved > for the > > user without their knowledge. What if I don't want my work on > page A to > > be saved and really just want to go to page B? > > > > In situations like this, I prefer to prompt the user with a > message like > > "Any unsaved changes on this page will be lost. Do you want to > > continue?" If they click ok, send them to page B. If they click > > cancel, nothing happens and they are then able to manually save > Page A's > > data before moving on to Page B. > > > > You can even be intelligent about when to display this message > with some > > javascript that inspects the form contents (and/or listens to > onblur > > events) and only prompts the user if the form data has actually > changed. > > > > > > - Scott > > > > -----Original Message----- > > From: Wendy Smoak [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, April 27, 2005 4:25 PM > > To: Struts Users Mailing List > > Subject: Re: Double submit and Implied Save > > > > From: "Nancy Lin" <[EMAIL PROTECTED]> > > > >>1. Here's our application requirement: > >> when user modifies a page, say A and clicks on any other > menu > >>item or link, say B without clicking any button on the modified > page > >>A, page A needs to be automatically saved. If there is nothing > wrong > >>during save, end user should be redirected to page B, otherwise > page A > > > > > >>should stay with error messages. > > > > > > I do this by having 'onClick()' on the links submit the current > form. > > Before the form submit, the javascript sets the value of a hidden > form > > element that will tell me where they were trying to go. > > > > If there's an error, then the user is returned to the page with > error > > messages. If not, the Action does whatever it needs to do, then > decides > > where to forward/redirect based on that hidden field. > > > > -- > > Wendy Smoak > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]