How to disabe form double-submitsin Javascript
In Internet Explorer few javascript submissions didn’t work.Here is the simplest bit of javascript code that worked in IE. We can just add the following code to submit button:
onclick=”this.disabled=true,this.form.submit();”
The javascript is executed the first time someone clicks the submit button. The first bit of code ‘this.disabled=true’ disables the button so it can’t be clicked again. The second bit of code ‘this.form.submit()’ then submits the form results (the form won’t work at all without this code). In the end, our form should look something like this:
<form>
<input type=”submit” value=”Send” onclick=”this.disabled=true,this.form.submit();”>
</form>
