Re: BIT OT - preventing double submit
| From: | Randum Ian | Date: | Fri, 04 Apr 2003 14:10:46 +0000 |
| Subject: | Re: BIT OT - preventing double submit | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142325@lists.php.net to get a copy of this message | ||
Isn't it easy just to do an "onClick Disable Button" kinda thing?
> 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;">
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php