It works! Thank you Amar!
--- "Jirole, Amar" <[EMAIL PROTECTED]> wrote: > You can take care of that your action class. > > Something like this > Execute(ActionMapping....) > { > result = saveToDatabase(); > If(result == success) > { > forward = mapping.findForward("success"); > } > else > { > forward = mapping.findForward("failure"); > } > > } > > And then map success to closePopup.jsp and redisplay > if there is an error > > -----Original Message----- > From: Julia Weaver > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 05, 2004 5:48 PM > To: Struts Users Mailing List > Subject: RE: close pop-up window > > > Thanks, but I want to close the window only if > without > any error message (only if data is saved to the > database successfully). > > Please give me further help. Thanks! > > > > > > > --- "Jirole, Amar" <[EMAIL PROTECTED]> wrote: > > Step 4 is be simple : > > map success forward to a jsp, which has something > > like this : > > <script> > > function refreshAndClose() > > { > > opener.focus(); > > window.close(this); > > } > > </script> > > > > <body onload="refreshAndClose()"> > > </body> > > > > Step 5 is more tricky and depends upon your app > > design > > > > HTH > > -Amar > > > > -----Original Message----- > > From: Julia Weaver > > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, May 05, 2004 5:14 PM > > To: Struts Users Mailing List > > Subject: close pop-up window > > > > > > Hi, > > > > I have done the following 1, 2, 3 steps, but do > not > > know how to do step 4 and 5. Please help me, > thanks! > > > > > > > > 1. When the user clicks on the link a pop-up > browser > > window appears with a form containing all the > > details > > about that item. > > > > 2. After modifying the item 's details the user > > clicks > > on the form Submit button. > > > > 3. The Submit action saves the changes to the > > database. > > > > 4. The pop-up windows closes. > > > > 5. The original, parent page 'refreshes ' to > reflect > > the changes the user made in the pop-up windows. > > > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Win a $20,000 Career Makeover at Yahoo! HotJobs > > > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > > > > --------------------------------------------------------------------- > > 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] > > > > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > --------------------------------------------------------------------- > 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] > __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]