Great to be of some help. This is a wonderful community, isn't?

Cheers,
Saul



> -----Original Message-----
> From: Brian McSweeney [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 11:30 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Use Validator for two actions on same jsp
> 
> 
> 
> 
> 
> Thanks  Saul,
> 
> You're solving all my problems :-)
> 
> Cheers,
> Brian
> 
> -----Original Message-----
> From: Yuan, Saul (TOR-ML) [mailto:[EMAIL PROTECTED]
> Sent: 02 October 2003 14:05
> To: Struts Users Mailing List
> Subject: RE: Use Validator for two actions on same jsp
> 
> 
> Havn't tried that though, but if you put the following in your jsp:
> 
> 
> <html:javascript formName="/action1" method="validateAction1Form"
> dynamicJavascript="true" staticJavascript="false" />
> 
> <html:javascript formName="/action2" method="validateAction2Form"
> dynamicJavascript="true" staticJavascript="false" />
> 
> <script language="Javascript1.1" src="staticJavascript.jsp"></script>
> 
> 
> The staticJavascript.jsp file is the same as in my previous post
> regarding validation.
> 
> I think it may work, assuming you've defined the rest properly in your
> validation.xml file.
> 
> 
> 
> Saul
> 
> 
> 
> 
> > -----Original Message-----
> > From: Brian McSweeney [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 02, 2003 6:58 AM
> > To: 'Struts Users Mailing List'
> > Subject: Use Validator for two actions on same jsp
> >
> >
> >
> >
> >
> > Hi all,
> >
> > Didn't really get any clear response on this before.
> >
> > Is it possible to validate two actions from one jsp using the
> validator.
> > This is easiest to explain with a short bit of code:
> >
> >
> > <html:form action="/action1.do" onsubmit="return
> > validateAction1Form(this)" method="post">
> > <table width="100%">
> >     <tr>
> >         <td><label for="email"><fmt:message
> > key="label.email"/>:</label></td>
> >         <td>
> >           <html:text property="email" size="25"/>
> >         </td>
> >     </tr>
> >        <tr>
> >           <td>
> >                <INPUT type=SUBMIT value="submit">
> >           </td>
> >        </tr>
> > </table>
> > </html:form>
> >
> >
> > <html:form action="/action2.do" onsubmit="return
> > validateAction2Form(this)" method="post">
> > <table width="100%">
> >     <tr>
> >         <td><label for="creditcard"><fmt:message
> > key="label.creditcard"/>:</label></td>
> >         <td>
> >           <html:text property="creditcard" size="25"/>
> >         </td>
> >     </tr>
> >        <tr>
> >           <td>
> >                <INPUT type=SUBMIT value="submit">
> >           </td>
> >        </tr>
> > </table>
> > </html:form>
> >
> > Now normally I'd just put in
> >
> > <html:javascript formName="action1Form">
> >
> > to validate the first form. But I wonder can I validate the two from
> the
> > same page depending on which button gets pressed?
> >
> > If this is impossible, then I'd like to add it as a feature request.
> >
> > Cheers,
> > Brian
> >
> >
> >
> >
---------------------------------------------------------------------
> > 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