• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling form submission in IE and Firefox

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typical situation. I have a form. I don't want the submit button to be clicked more than once. So I'm disabling the button in a javascript method as per normal.

My problem is that it only works in FF. The button is disabled then the form submits. In IE, the button is disabled but the form does not submit.



jsp:




How can I make this work in both FF and IE?
 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course I always get an idea once I post a question.

What I did was make the button always be disabled, and make the form *never* submit. Then I added an explicit form submission.

Apparently in IE if the button is disabled the form submission is canceled and in FF it isn't.



And add a return to the onclick for good measure:


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic