aspose file tools*
The moose likes Struts and the fly likes Java script Validation in struts form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Java script Validation in struts form" Watch "Java script Validation in struts form" New topic
Author

Java script Validation in struts form

unnii
Greenhorn

Joined: Jan 21, 2008
Posts: 23
Hi Guys,

I written a function to validate on clicking Add button(submit) but the function is getting fired on clicking Add(html:submit) and Cancel(html:cancel).

i have textboox named 'categoryName' and button named 'Add' and 'cancel'

I written a javascript for a form like the following:



and i call the function like :


i have two button called Add, Cancel as follows:

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Take a look at the generated HTML. That should help answer your question.
 
wood burning stoves
 
subject: Java script Validation in struts form