How is client side validation going to work if the JavaScript isn't there?

Regardless, this JavaScript is to set the focus on the field you specified
in the form with the focus="fieldName" attribute of the <html:form> tag.

Greg


-----Original Message-----
From: Mounagurusamy, Jayakumar (HAL)
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 11:12 AM
To: 'Struts Users Mailing List'
Subject: Validate Client side(Javascript) code shows up in the page


Hello,

I got the following configuration in the struts-config.xml,

  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames"
value="WEB-INF/resources/validator/validator-rules.xml,
WEB-INF/resources/validator/apisValidation.xml" />
  </plug-in>

when I go to the html page the JavaScript code shows up in the page which
suppose not to be there. When look into the source code through view source,
I see the following code and remaining out side the <script> tag? I am not
sure what configuration I miss??

<script type="text/javascript" language="JavaScript">
  <!--
  var focusControl =
document.forms["apisLogonForm"].elements["bookingNumber"];

  if (focusControl.type != "hidden") {
     focusControl.focus();
  }
  // -->
</script>

thanks

Jay

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