Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cancel button and bypassing JavaScript validation

 
John King
Ranch Hand
Posts: 165
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic