This small bit of JavaScript can prevent orders from being submitted twice.
The key is that instead of a standard "submit" button (<input type="submit"...>), we use a regular button (<input type="button"...>) that calls the "submit()" function using JavaScript.
This part goes in the head:
<SCRIPT language="JavaScript">
<!--
var submitted = false;
function doSubmit(form) {
if (!submitted) {
submitted = true;
form.submit();
}
}
// -->
</SCRIPT>
And this is the generic button and function call:
<INPUT TYPE="BUTTON" VALUE="Click To Accept" NAME="submission" ONCLICK="doSubmit(this.form)">