File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts client side validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts client side validation" Watch "Struts client side validation" New topic

Struts client side validation

saurav sarkar
Ranch Hand

Joined: Jan 07, 2007
Posts: 180

Hi All,

I have to migrate my JS code in my JSPs to Struts 1.0 validator.
I have put all the necessary code into the xml files,resource properties and the jsps.

I have many fields which are being validated in the JS functinons to be empty.If empty then an alert message.

I am trying to go one by one of these fields.I am trying for the first one where i have put the required validator in the xml files.
The code in jsp is like a js function is called which is calling the document.form.submit().

So in the html:form tag i have used the onsubmit="return validateBusinessForm(this)" so that whenever js functtion calls the submit the onsubmit method of the form should be called and the validation should happen.

But i am not able to invoke the validation.Am i doing something wrong?..

Please help

Be Objectively Oriented.Explore the power of OOPs.
My Blog, Eclipse EMF Query committer.
wood burning stoves
subject: Struts client side validation