Prevent Multiple Form Submission Using JQuery

Spread the love

Many of Us faced this problem while using  an ajax form that sometime users used to submit a form twice or more by clicking on submit button.if User by mistake double click on submit button then information will be saved twice in our database.so you must disable the submit button just after single click on button until data being submitted in database.So in this post i will tell you how you can do this using JQuery.

You can simply use  jQuery off() method.,JQuery off()  method is used to remove event handler from the element attached with the on() method.use off()  method.Use Off() method after click event is triggered  to disable element for the future clicks.

how to avoid double click on submit button using jquery,how to prevent multiple clicks on submit button in javascript,how to prevent multiple clicks on submit button in jquery,prevent double click on button javascript,prevent multiple form submissions php,prevent double click on submit button,how to prevent multiple clicks on button in jquery,jquery prevent form submit multiple times

In below demo i am going to create 2 buttons.Click Me and Disable Click . Whenever you will click on click me button it will show a popup but when you click disable click button the popup won’t appear until you refresh your page.


One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *