struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Pandey" <cpan...@BLUEsingapore.com>
Subject RE: Client Side Validation
Date Wed, 02 Aug 2006 02:50:07 GMT
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:lixin.chu@gmail.com] 
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message