This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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.
Have you checked out Aspose?
subject: Struts client side validation
jQuery in Action, 3rd edition