BIT OT - preventing double submit
| From: | Dan Rossi | Date: | Fri, 04 Apr 2003 13:39:14 +0000 |
| Subject: | BIT OT - preventing double submit | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-142324@lists.php.net to get a copy of this message | ||
i've seen this mentioned here a few times , ok its jsript , but i dont think
there is anyone here who doesnt use any jscript or even html ?? heh
basically all u do is disable the button once pressed
<script language="JavaScript"><!--
function Localize(pStr){return pStr;}
var ProcessingText = Localize("Processing....");
var cnt=0;
function doValidate(f){
f.BIN_button.value=ProcessingText;
f.BIN_button.disabled=true;
if (cnt==0)f.submit();
cnt++;
}
//--></script>
<input type="submit" value="Add Photos" name="BIN_button">
<form ***** onSubmit="doValidate(this);return false;">