try <html:javascript formName="logonForm" dynamicJavascript="true">
On Wed, 16 Feb 2005 10:39:11 -0800 (PST), Jonathan M Z
<[EMAIL PROTECTED]> wrote:
> hi folks, I am having some problem with javascript
> validation code generation.
>
> I have the following code in my jsp(only showing the
> relevant ones):
>
> <html:form onsubmit="return validateLogonForm(this)"
> action="/logon" method="post">
> <script language="javascript">
> <html:javascript
> formName="logonForm"></html:javascript>
> </script>
>
> I have the following in validation.xml
> <form-validation>
>
> <!-- ========== Default Language Form Definitions
> ===================== -->
> <formset>
>
> <form name="logonForm">
>
> <field property="userName"
> depends="minlength,maxlength">
> <arg0 key="prompt.username"/>
> <arg1 key="${var:minlength}"
> name="minlength"
> resource="false"/>
> <arg2 key="${var:maxlength}"
> name="maxlength"
> resource="false"/>
> <var>
> <var-name>maxlength</var-name>
> <var-value>16</var-value>
> </var>
> <var>
> <var-name>minlength</var-name>
> <var-value>3</var-value>
> </var>
> </field>
> ...
>
> I have the following in my struts configuration file:
> <plug-in
> className="org.apache.struts.validator.ValidatorPlugIn">
> <set-property property="pathnames"
> value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> </plug-in>
> <form-beans>
> <form-bean name="logonForm"
>
> type="com.xxx.software.xxx.security.LogonForm"/>
>
> </form-beans>
>
> <action-mappings>
> <action path="/logon" name ="logonForm"
> type="com.xxx.software.xxx.security.LogonAction">
> </action>
> </action-mappings>
>
> The problem is that the default javascription
> functions from validation-rule.xml are generated(eg.
> validateByte, validateFloat) but not
> validateLogonForm().
> what's wrong here?
>
> __________________________________
> Do you Yahoo!?
> All your favorites on one personal page â Try My Yahoo!
> http://my.yahoo.com
>
> ---------------------------------------------------------------------
> 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]