Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

www.xxxcon, which comes first ob_start or session, wwwxxx/58/2010, xxxxdup, xxxxdup, mailx informatii, should producers of software-based services, such as atms, be held liable for economic injuries suffered when their systems fail?, mysql feiertage, bash netcat eof, 192.168.1.41:8000

Links

XODOX
Impressum

#1: Recognizing double clicks

Posted on 2009-11-22 06:30:25 by Skip Evans

Hey all,

Every site I've ever stuck a credit card into said "only click
once...". I just this requirement from a client.

a.System should recognize a duplicated click, so the message
in red “only click once” should be unnecessary.

Is this doable???

Has anyone on the list ever done this???
--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

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

Report this message

#2: Re: Recognizing double clicks

Posted on 2009-11-22 06:34:58 by Skip Evans

It just dawned on me the button may be disabled right when
it's clicked to prevent a double submit?

Is that doable?

Skip

Skip Evans wrote:
> Hey all,
>
> Every site I've ever stuck a credit card into said "only click
> once...". I just this requirement from a client.
>
> a.System should recognize a duplicated click, so the message in red
> “only click once” should be unnecessary.
>
> Is this doable???
>
> Has anyone on the list ever done this???

--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

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

Report this message

#3: Re: Recognizing double clicks

Posted on 2009-11-22 07:30:18 by Manuel Lemos

Hello,

on 11/22/2009 03:34 AM Skip Evans said the following:
> It just dawned on me the button may be disabled right when it's clicked
> to prevent a double submit?
>
> Is that doable?

This forms generation class can do exactly that. It generates Javascript
with form HTML that disables the form submit button while the form is
submitted. Then it enables the submit button again. If the user clicks
on the button again, an alert message appears asking whether the user
really wants to submit the form again.

http://www.phpclasses.org/formsgeneration

Here you can see a live example:

http://www.meta-language.net/forms-examples.html?example=tes t_form

--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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

Report this message

#4: Re: Recognizing double clicks

Posted on 2009-11-22 08:10:11 by ahlin.hans

Write a function that generate a unique form id and one that checks if
it already has been submitted.
Store data that the script sends after a submit has been done in the
session array and if it is a re-submit just re-send the the data.

2009/11/22 Skip Evans <skip@bigskypenguin.com>:
> Hey all,
>
> Every site I've ever stuck a credit card into said "only click  once=
....". I
> just this requirement from a client.
>
> a.System should recognize a duplicated click, so the message in red =E2=
€œonly
> click onceâ€=9D should be unnecessary.
>
> Is this doable???
>
> Has anyone on the list ever done this???
> --
> ==================== =====
============
> Skip Evans
> PenguinSites.com, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://penguinsites.com
> ------------------------------------
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--=20
MvH / Hans Åhlin
Tel: +46761488019
http//www.kronan-net.com/

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

Report this message

#5: Re: Recognizing double clicks

Posted on 2009-11-22 14:36:41 by Phpster

Yep

Bastien

Sent from my iPod

On Nov 22, 2009, at 12:34 AM, Skip Evans <skip@bigskypenguin.com> wrote:

> It just dawned on me the button may be disabled right when it's =20
> clicked to prevent a double submit?
>
> Is that doable?
>
> Skip
>
> Skip Evans wrote:
>> Hey all,
>> Every site I've ever stuck a credit card into said "only click =20
>> once...". I just this requirement from a client.
>> a.System should recognize a duplicated click, so the message in re=20
>> d â€=9Conly click onceâ€=9D should be unnecessary.
>> Is this doable???
>> Has anyone on the list ever done this???
>
> --=20
> ==================== =====
============
> Skip Evans
> PenguinSites.com, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://penguinsites.com
> ------------------------------------
> Those of you who believe in
> telekinesis, raise my hand.
> -- Kurt Vonnegut
>
> --=20
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

Report this message

#6: Re: Recognizing double clicks

Posted on 2009-11-22 16:47:25 by TedD

At 11:30 PM -0600 11/21/09, Skip Evans wrote:
>Hey all,
>
>Every site I've ever stuck a credit card into said "only click
>once...". I just this requirement from a client.
>
>a.System should recognize a duplicated click, so the message in red
>"only click once" should be unnecessary.
>
>Is this doable???
>
>Has anyone on the list ever done this???

Yes. I have done this before.

Three things:

1. The Credit Card processing company should have "Duplicate
Suppression" turned ON. Contact them.

2. Use javascript to deactivate the Submit button after it's clicked.

3. 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.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

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

Report this message

#7: Re: Recognizing double clicks

Posted on 2009-11-22 20:01:47 by Mark Kelly

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

Report this message