tag:blogger.com,1999:blog-8712770457197348465.post2033696335071000655..comments2024-03-19T01:04:48.783-07:00Comments on Javarevisited: How to Disable submit button in HTML JavaScript? Multiple Form Submission Solution Examplejavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-8712770457197348465.post-39078943579395746502015-07-26T23:39:14.730-07:002015-07-26T23:39:14.730-07:00can anyone help, consider an example containing 2 ...can anyone help, consider an example containing 2 buttons SAVE and APPLY, apply should work after click on SAVE button only, using html and java script, thanks in advance<br />Anonymoushttps://www.blogger.com/profile/12063417675577256385noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-29761570725642746822014-09-05T18:37:22.465-07:002014-09-05T18:37:22.465-07:00Can anyone think of a draw back for using this:
fo...Can anyone think of a draw back for using this:<br />form onsubmit="document.getElementById('submit button id').disabled='disabled';"<br />would it catch multiple submissions?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-61464302394760609162014-04-06T18:01:48.542-07:002014-04-06T18:01:48.542-07:00Whoever made that uncivilized statement to the aut...Whoever made that uncivilized statement to the author's tutorial was very rude and immature. I would like to thank the author for this tutorial.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-11882350883112479802014-03-09T19:58:42.457-07:002014-03-09T19:58:42.457-07:00@3rd Anonymous before me:
Before you're saying...@3rd Anonymous before me:<br />Before you're saying another people's example is shit, let's see if you can make any useful tutorial by yourself, shit. I've tried this tutorial, and it works. Or maybe, the difference is in the brain. I don't know. I feel pity for you. let's talk in civilized mode, because uncivilized people drives me uncivilized too.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-28955255388778763952014-01-28T06:23:57.691-08:002014-01-28T06:23:57.691-08:00@Javin, re your reply to Yakov Fain: Your example...@Javin, re your reply to Yakov Fain: Your example works if you're loading a new page in "_self". Occasionally, however, you need to send to _blank. "return false" works in both instances.<br /><br />Robert Stout<br />bobinsanantonio@yahoo.screwspam.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-42075976833195548952014-01-28T06:20:51.806-08:002014-01-28T06:20:51.806-08:00I usually use Javascript for form submission, allo...I usually use Javascript for form submission, allowing me to validate data and do other stuff before the form is submitted. I noticed that "return false;" in the button onclick works better for this scenario as the example above disables the button and prevents any further use. <br /><br />Example for a button:<br />id="btnShowReport" onclick="submitData();return false;Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-58269342764648805982013-02-15T06:53:06.274-08:002013-02-15T06:53:06.274-08:00@Yakov Fain, Once you send request to server, eith...@Yakov Fain, Once you send request to server, either you will go to another page or even if you return to same page, it would have been reloaded which makes the submit button enabled again. Javin @ String to Integer Javahttp://javarevisited.blogspot.com.au/2011/08/convert-string-to-integer-to-string.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-36967032023363720902013-02-15T05:05:05.101-08:002013-02-15T05:05:05.101-08:00This article tells just the half of the story. You...This article tells just the half of the story. You'll need to enable the button back at some point in time, I guess :)<br />Yakov Fainhttps://www.blogger.com/profile/11528023572587385820noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-35277049895137316302013-02-06T04:47:46.890-08:002013-02-06T04:47:46.890-08:00@Arun, if you have client side validation than do ...@Arun, if you have client side validation than do it before submitting form. here we talked about disabling submit button and preventing multiple submissions, validation should be before that.Javin @ ClassLoader in Javahttp://javarevisited.blogspot.com/2012/12/how-classloader-works-in-java.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-83951299375339868982013-02-06T02:11:26.450-08:002013-02-06T02:11:26.450-08:00I have a problem with this code example.. what if ...I have a problem with this code example.. what if i have missed the mandatory field and clicked the submit button.<br /><br />next time it is not allowing the user to enter the field :(Arun Adurhttps://www.blogger.com/profile/05520188469417784140noreply@blogger.com