Antony, The preferred way is to copy the static javascript into a static file (.js) and include it as a <script> element. This will also allow it to be cached by your browser. There's no reason why you must generate those functions every time. The only generation must be for your form.
Paul On 5/9/07, Antony Stubbs <[EMAIL PROTECTED]> wrote:
Having staticJavascript=true generates *all* the validation functions specificed in struts-validators.xml (?) even if the form it's generating for only uses the REQUIRED validator. Is there a way to minimise the javascript generated? I'm going to try a work around, where I've extracted the generated javascript, and have put it in an external file that I will reference. Once I've decided which functions I am not going to use, I will remove them from this file. -- View this message in context: http://www.nabble.com/-S1--Struts-JavaScript-Validation-staticJavascript-generates-too-much-code-tf3718534.html#a10403586 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]