Hmm.., maybe I misunderstood you.. But here's what i understood: According to your initial question, you want to ask the question "are you sure you want to submit?" as soon as the user hits the "Submit" button, right? If the user clicks "Yes" you go on ahead with the submission. And if the user clicks "Cancel", then you don't even submit the form, correct? All of this has nothing to with Struts, so you don't need to mess with the strts-conifg.xml for this partiular functionality. What i have indicated earlier will be enough for that bit..
The forwards for "success" and "failure" (in your action mapping below) are where the user will be directed to *after* submission of the registration (ie. after your form bean's validate method is executed and if *that* is successful, RegisterAction's perform method is executed..).. (Btw, you are forwarding to /index.jsp in both cases, so yo may want to fix that..) hth, Geeta Dinh Nguyen wrote: > Hi Geeta, > > Don't I have to mofidy the struts-config file too? Where would I > modify that? Below is part for register page in the struts-config file > <action path="/register" > type="myproject.Action.RegisterAction" > name="registerForm" > input="register.jsp" > validate="true" > scope="request"> > <forward name="success" path="/index.jsp"/> > <forward name="failure" path="/index.jsp"/> > </action> > > Thanks, > Dinh Nguyen > --- In [EMAIL PROTECTED], "Geeta Ramani" <[EMAIL PROTECTED]> > wrote: > > Hi Dinh nguyen: > > > > I didn't look at your files, but it's fairly starightforward I > think.. You > > add this javascript code within the <head> </head> of your > registration > > page. In your case it would be something like this: > > > > <head> > > <script language="JavaScript"> > > function confirmSubmit(){ > > if (confirm("are you sure you want to submit > information?") { > > window.location.href ="<html:rewrite > > page="/goToHomeAction.do" />"; > > } > > } //end method confirmPrint > > </script> > > </head> > > > > And (again in the registration page) your submit button will have > code > > like this: > > > > <html:submit value="Submit" onclick="return confirmSubmit()" /> > > > > Regards, > > Geeta > > > > Dinh Nguyen wrote: > > > > > Hi Geeta, > > > > > > Thanks for tipping me the info. So in this case, how and where > would > > > I implement/insert the javascript code in the files I sent out > > > earlier? http://groups.yahoo.com/group/struts/message/71619 > > > > > > Thanks for your help. > > > Dinh nguyen > > > > > > --- In [EMAIL PROTECTED], "Geeta Ramani" <[EMAIL PROTECTED]> > > > wrote: > > > > Hi Dinh Nguyen: > > > > > > > > We had a similar requirement and we solved it using Javascript's > > > > location.href .. I reproduce our code below: > > > > > > > > <script language="JavaScript"> > > > > function confirmPrint(msg){ > > > > if (confirm(msg)) { > > > > window.location.href ="<html:rewrite > > > > page="/BillingReportPrintAction.do" />"; > > > > } > > > > } //end method confirmPrint > > > > </script> > > > > > > > > > > > > So i think you should be able to do something similar > (combining it > > > with > > > > an onClick method for your submit button..) > > > > > > > > Hth, > > > > Geeta > > > > > > > > Dinh Nguyen wrote: > > > > > > > > > Hi, > > > > > > > > > > Do you know how to do the confirm page using struts? For > example, > > > > > after a person fill-out a registration form, he/she clicks on > > > Submit > > > > > button, she/he will be redirected to a page says that "are you > > > sure > > > > > you want to submit information?". If the use clicks yes, > button, > > > > > then he/she will be redirected back to the home page, > otherwise, > > > > > he/she will be redirected back to registration form/page if > the > > > > > cancel button is clicked. > > > > > > > > > > Thanks, > > > > > dinh Nguyen > > > > > > > > > > -------------------------------------------------------------- > ---- > > > --- > > > > > 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] > > > > > > ------------------------------------------------------------------ > --- > > > 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] > > --------------------------------------------------------------------- > 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]