> -----Original Message-----
> From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 28, 2002 7:25 AM
> To: [EMAIL PROTECTED]
> Subject: validator generated HTML code
>

>
> I suppose, I should only get the necessary functions for my validation, in
> my case function validateRequired(form). What am I doing wrong or missing?
> Can I get rid of the other functions?

The docs...
http://jakarta.apache.org/struts/userGuide/struts-html.html#javascript

By default the <html:javascript ...> tag will include both dynamic and static
functions.  What we did was set dynamicJavascript=false in a separate file then
include that file like:

<script src="<html:rewrite page="validation_js.jsp"/>"
        type="text/javascript"></script>


Then for each form do a:

<html:javascript formName="[[FORM NAME]]" staticJavascript="false"/>

where [[FORM NAME]] is the name of your form.

>
> Secondly, i notice that i get a lot of \n characters in between the lines of
> the generated functions, i.e.:

The line breaks in the default file are Unix line breaks.  If you are on windows
you need to use an editor that can understand them. (i.e.. Wordpad.  Notepad
won't work)


-kevin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to