Hi,
Here's some code to use....
Add this <script> element either in your <head> section or in the body above the <form> element:
Code:
<script>
function disableSubmit() {
var elem = document.getElementById('submit');
elem.disabled = true;
setTimeout(function () {
elem.disabled = false;
},20000);
}
</script>
Next, add the onsubmit attribute to your form tag, like this:
HTML Code:
<form method="post" action="http://www.northcoastsealing.com/frm.php" name="NCS Service Confirmation Form" onsubmit="disableSubmit();">
Finally, add an id attribute to your submit button tag, like this:
HTML Code:
<input type="submit" name="Submit" id="submit" value="Submit" tabindex="20">
The script disables the submit button for 20 seconds, then enables it again. You can make it longer if you wish.
The only reason to enable it again is as a failsafe so the user gets back control after a period.
Bookmarks