• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disable the validation when th Cancel button is clicked (usingStrut validator)

 
Usera User
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using strut validator and set the fields in the form is required. When the user clicks the submit button with empty fields, the javascript will block the submit. However, when the user click the Cancel button, the javascript also block the submit !

So, how to make the validator to function only for the submit button ?

Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ar you using the <html:reset> tag for the cancel button? Struts should handle the disabling of javascript validation if you use this tag.
[ July 13, 2005: Message edited by: Merrill Higginson ]
 
kwwong wong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merrill Higginson. I use the <html:cancel> and it works. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic