Put the following in <head> tag:
<script language="javascript"> var submitted = 0; function LockButton (form,element) { if ( ! submitted ) { form.elements[element].disabled=true; submitted = 1; form.submit; } else { alert("Form already submitted, please be patient"); } } </script>
<input type="button" name="submitbutton" value="Test Button" onclick="LockButton(this.form,'submitbutton');" />