Whoops ................. that didn't quite solve the problem ..... the real
javascript methods are not quite being appended to the response .....

My apologies!



-----Original Message-----
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 18 March 2004 12:11
To: 'Struts Users Mailing List'
Cc: 'Joe Germuska'; 'Theodosios Paschalidis'
Subject: RE: [SOLVED] Struts Validator prints all javascript functions 

Hi All!

After some debugging, I worked out that there are two variables
"dynamicJavaScript" and "staticJavaScript" in the JavascriptValidatorTag
class.

By default, their values are "true". And Hence, the staticJavaScript also
gets included in the response.

i.e. to only display relevant JS methods, your <html:javascript> tag should
look like,

========
<html:javascript formName="myformName" dynamicJavascript="true"
staticJavascript="false" />
========

cheers,

kunal


-----Original Message-----
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 March 2004 08:55
To: 'Struts Users Mailing List'
Subject: Struts Validator prints all javascript functions

Hi All!

I am attempting to use Struts Validator.

All works well, but I am only using the "required" validation in my code.

However, the JavaScript that gets generated, include other functions like
checkEmail, minLength, etc. etc.

Is this expected behaviour?

My code (FYI):
=======================
<html:form name="vehicleEnquiry" action="/vehicleEnquiry.do" method="post"
type="org.apache.struts.validator.DynaValidatorActionForm" onsubmit="return(
validateVehicleEnquiry(this) );"  >

....

                <tr>
                        <td><bean:message key="label.name" />:</td>
                        <td> <html:text property="name" value="" /> </td>
                </tr>
....

<html:submit value="Send Enquiry" />
</html:form>
<html:javascript formName="vehicleEnquiry" />
======================

TIA,

Kunal



---------------------------------------------------------------------
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]





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

Reply via email to