Hi All:

This is what I am doing.

<html:form action="/addAttendeeDetails" onsubmit="return
validateAttendeeDetailsForm(this)">
.
.
.
.
.
.
<html:javascript formName="AttendeeDetailsForm"/>
</html:form>


But the Code only does Server Side Validation.

Am I missing naything pls.

Thanks.

Chetan Pandey

-----Original Message-----
From: Romu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 3:28 PM
To: Struts Users Mailing List
Subject: Re: Client Side Validation

your form shoud have been named :
attendeeDetailsForm, like bean no caps for first letter .

then
validateAttendeeDeta
>
> onsubmit="validateAttendeeDeta
> >
> > ilsForm ();
>
>  or
validateAttendeeDeta
>
> onsubmit="validateAttendeeDeta
> >
> > ilsForm (this);
> >
>
u can see the javascript generated in the source of your jsp btw .
hope it helps






2006/8/2, Chetan Pandey <[EMAIL PROTECTED]>:
>
> I have this:
>
> <html:form action="/addAttendeeDetails"  onsubmit="return
> validateRequired(this)">
>
> Where "validateRequired" comes from the following Javascript code in my
> validator-rules.xml
>
> <validator name="required"
>             classname="org.apache.struts.validator.FieldChecks"
>                method="validateRequired"
>          methodParams="java.lang.Object,
>                        org.apache.commons.validator.ValidatorAction,
>                        org.apache.commons.validator.Field,
>                        org.apache.struts.action.ActionMessages,
>                        org.apache.commons.validator.Validator,
>                        javax.servlet.http.HttpServletRequest"
>                   msg="errors.required">
>
>
>         <javascript><![CDATA[
>             function validateRequired(form) {
> ....
> }
>       ]]>
>          </javascript>
>     </validator>
>
> But no Client-side Validation is occuring
>
> -----Original Message-----
> From: Lixin Chu [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 02, 2006 10:35 AM
> To: Struts Users Mailing List
> Subject: Re: Client Side Validation
>
> do you have something like:
> onsubmit="validateAttendeeDetailsForm (this);"
> in <html:form> ?
>
> and form name is not attendeeDetailsForn ?
>
>
>
>
> ---------------------------------------------------------------------
> 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