• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using validator framework with DispatchAction

 
Mano Jena
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Struts 1.1 validation framework. There are two buttons
in my form: submit and cancel. They are both html:submit.

When "submit" is clicked, the JavaScript
validate the entries in the form first, then the form is submit.

When "cancel" is clicked, the javascript still validates
the form. I want to bypass the JavaScript validation in this case.
I tried html:cancel for the cancel button and found no difference.

How to bypass client side JavaScript validation when "cancel"
button is click?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use the html:cancel tag instead of html:submit. This tag will cause validations to be bypassed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic