Re: Disabling button onclick in IE
| From: | tedd | Date: | Wed, 02 Dec 2009 19:02:36 +0000 |
| Subject: | Re: Disabling button onclick in IE | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300232@lists.php.net to get a copy of this message | ||
At 10:09 AM -0600 12/2/09, Skip Evans wrote:
Hey all, Tedd & Ash, yes, I'm definitely looking into solving it server side, but I need this quick fix while I come with a solution more along the lines of what you've both suggested.A quick fix? You've spent more time writing your question than it would take to do a quick fix. Quick fix: 1. Use javascript to deactivate the Submit button after it's clicked. Here's an example of a javascript fix: http://www.webbytedd.com/forms/single-submit1 2. Just in case the user has javascript disabled, then have your php form generate a token and place that value in a session. That way, upon a refresh (double click) you can check if the session contains anything and if it does, then don't do anything. Here's an example of a php fix: http://www.webbytedd.com/forms/single-submit2 Keep in mind that your browser's session will be in effect upon testing this. You should be able to get the idea. Permanent fix: Contact the Credit Card processing company and have them turn "Duplicate Suppression" to ON. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com