The html:javascript tag has a parameter named 'statisJavascript' which says if Struts has to render all static code (i.e. the validations functions). So, if you have several form in a page, you should write something like this :


<html:javascript formName="formA" />
<html:javascript formName="formB" staticJavascript="false" />
<html:javascript formName="formC" staticJavascript="false" />
...

Thus, validation functions will appear only once.

HTH

Thomas

At 17:23 04/09/2003, you wrote:
Hi,

I'm having problems when validating a multiform page.
I have 4 forms on a single page and I've set up the validation framework
for them. When I insert the html:javascript tag on the jsp page to
create the dynamic code, it creates sth like this:

<script type="text/javascript" language="Javascript1.1">
    function validateFrm_ccd_crn_Filter(form) {  [...]   }
    function maxlength () {  this.aa = [...]   }
</script>
<script type="text/javascript" language="Javascript1.1">
    function validateFrm_ccd_par_Filter(form) {  [...]   }
    function maxlength () {      this.aa =     }
    function mask () {      [...]    }
</script>
<script type="text/javascript" language="Javascript1.1">
    function validateFrm_ccd_pol_Filter(form) {        [...]   }
    function maxlength () {      this.aa = [...]    }
    function mask () {      this.aa = [...]    }
</script>

The problem is, that the mask and maxlength methods overwrite each
other. Therefore the client side validation does work only for the last
form that is used on the page.
Anything that I should different than including:
dynamicJavascript="true" /> dynamicJavascript="true" /> dynamicJavascript="true" /> dynamicJavascript="true" /> on the JSP page? The server side validation works fine btw. Any help highly appreciated. Cheers, Martin --------------------------------------------------------------------- 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