Use struts validation, don't give the form it's own name this is done in the
struts config file. See Struts in Action chapter 12
(http://www.manning.com/husted/chap12.pdf).

Suzette H. Daniel

-----Original Message-----
From: Veena B N [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 7:13 AM
To: '[EMAIL PROTECTED]'
Subject: Javascript validation for struts form field elements


Hi

I am using struts form for jsp pages. I have a actionForm which initialises
a value object(which has getter and setter methods). So my form field
elements are specified as below in my jsp page--

<html:form action="createItemdata" method="GET" name="inqform"
type="com.xyz.abc.forms.oma.InquiryForm" onsubmit="return
validateInqform(inqform)" > <html:select property="inqVO.productDiv"
styleClass="SELECTMAND" tabindex="2">
  <html:option value="">-- Please Select --</html:option>

  </html:select>
</html:form>

Now if I want to do javascript(client end) validation, the form field
elements are not recognised since property is converted to name while
delivering the html page and the form field element name cannot contain
'.'(a dot) within the name for js validation.

Now how else can I access the property of the element without a dot for
client side validation. Can anyone please help


Thanks
Veena


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