Hi I am using the Velocity ValidatorTool to do client side javascript validation for my Struts application.
I have placed calls to $validator.getStaticJavascript() and getDynamicJavascript() in my .vm template. For example $validator.getDynamicJavascript("${formName}") The static call works (produces a <script> block) but the dynamic one doesn't produce anything. I am using these jars: velocity-tools-1.1.jar (contains ValidatorTool.class, dated 17 May 2004) velocity-1.4.jar velocity-dep-1.3.1.jar Many thanks if you can help James p.s. content generated by static call is this: <script type="text/javascript" language="Javascript1.1"> <!-- Begin /*$RCSfile: validateFloatRange.js,v $ $Revision: 1.9 $ $Date: 2004/03/28 16:53:21 $ */ /** * Check to see if fields are in a valid float range. * Fields are not checked if they are disabled. * <p> * @param form The form validation is taking place on. */ function validateFloatRange(form) { ---- massive snipping ------ if (fields.length > 0) { focusField.focus(); alert(fields.join('\n')); } return isValid; } //End --> </script> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]