• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disable and Enable a Submit Button

Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a problem with an application that the user may click twice on the submit button and the request goes to the back-end twice. I would like to prevent it by disabling the Submit button after the first click.

But the situation is... There are other JavaScript validations running of some of the fields of the JSP, and when one of them fail, i have to enable the button again, so that the user can correct the field and then submit again. Could you please help me out with this. Google didn't help much.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!