Hi.

On Sunday 22 Nov 2009 at 05:34 Skip Evans wrote:
> It just dawned on me the button may be disabled right when
> it's clicked to prevent a double submit?
> 
> Is that doable?

To mark a button as disabled after it has been clicked to prevent it being 
clicked twice just add some simple code in the button (all on one line in case 
it wraps):

onClick="this.disabled=true; this.value='Processing'; this.form.submit();"

However I would also do something server side (a unique ID for every form 
served works well) to handle browsers that don't have javascript turned on. 
Never rely on (or trust) code running on the client.

Cheers,

Mark


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to