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]

Reply via email to