Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Disable Multiple Form Submits with Vanilla JavaScript

var form = document.getElementById('formID');
var submitButton = document.getElementById('submitID');

form.addEventListener('submit', function() {

   // Disable the submit button
   submitButton.setAttribute('disabled', 'disabled');

   // Change the "Submit" text
   submitButton.value = 'Please wait...';
			
}, false);
Comment

PREVIOUS NEXT
Code Example
Javascript :: alphabet only in jquery 
Javascript :: access key of object javascript 
Javascript :: how to use url parameters in react 
Javascript :: get elements by class is not working 
Javascript :: check if a column is unique sql 
Javascript :: laravel array to js 
Javascript :: how to map objects in react native 
Javascript :: create svg element javascript 
Javascript :: javascript string contains function 
Javascript :: how to remove identical string in javascript 
Javascript :: javascript operator double pipes 
Javascript :: how to get the integer part of a string in javascript 
Javascript :: check if any property of object is null javascript 
Javascript :: jsconfig for default vue 
Javascript :: for element in string js 
Javascript :: regex separator 
Javascript :: unique values in array javascript 
Javascript :: js event preventdefault continue 
Javascript :: search in string array javascript 
Javascript :: localstorage set item 
Javascript :: javascript check if file exists on server 
Javascript :: capitalise first letter js 
Javascript :: the path argument must be of type string. received undefined react 
Javascript :: js capitalize 
Javascript :: how to get multiple checkbox value in jquery 
Javascript :: jquery find checkbox by value 
Javascript :: object key map javascript 
Javascript :: get number of days between two dates mongodb query 
Javascript :: json file with multiple records 
Javascript :: javascript change input value event 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =