Re: Double Click

From: Date: Thu, 01 Mar 2001 17:01:27 +0000
Subject: Re: Double Click
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42191@lists.php.net to get a copy of this message
On Thursday 01 March 2001 21:41, Brinkman, Theodore wrote: > A tactic I've been planning to use, but don't know if it actually works or > not, is to disable the button first thing in its onClick so the second > click occurs on a disabled button. Does anybody know if this actually > works or not? <script language="javascript"> <!-- var submitpressed; submitpressed=0; function submitcheck() { if(submitpressed) return false; submitpressed=1; return true; } //--> </script> <input type=button value="Submit" onClick="return submitcheck();"> > - Theo > > -----Original Message----- > From: John Huggins [mailto:huggins@tls2000.com] > Sent: Wednesday, February 28, 2001 3:04 PM > To: Manuel Lemos; php-general@lists.php.net > Subject: RE: [PHP] Double Click > > > If you are lucky and are feeding this form data to a database, you can > create a unique hash field from other fields that would not change from > click 1 to click 2. Then just make the database treat the hash as a > unique index and it should prevent double entries. Works for me. > > Other advice is to not tell the double clicker that had an error; Just > silently ignore their second request. > > > -----Original Message----- > > From: Manuel Lemos [mailto:mlemos@acm.org] > > Sent: Wednesday, February 28, 2001 2:55 PM > > To: php-general@lists.php.net > > Subject: Re: [PHP] Double Click > > > > > > Hello Fabian, > > > > On 28-Feb-01 03:01:02, you wrote: > > >Hi, > > > > > >I have a page, and when I have to add a product I use a form, > > > > many people are > > > > >used to make double click in every task, so when the product is > > > > sent with a > > > > >double click in the send button, the program send it twice to > > > > the data base. > > > > >What can I do to prevent this? > > > > You may want to try this forms generation class that lets you define a > > warning message that shows when the user attempts to submit a form more > > than once. > > > > http://phpclasses.UpperDesign.com/browse.html/package/1 > > > > Regards, > > Manuel Lemos > > > > Web Programming Components using PHP Classes. > > Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org 1Î > > �Ù  _;>]�D§^ > > -- > > E-mail: mlemos@acm.org > > URL: http://www.mlemos.e-na.net/ > > PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp > > -- > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#42191) next »