Re: Avoid multiple form submits.

2008-05-11 Thread Tony
There is a workaround for this on my blog

www.revolutionwebdesign .com/blog

Search around you should find it in there
Tw



On 5/9/08, Robert Rawlins [EMAIL PROTECTED] wrote:
 Hello Guys,

 I've got an issue with a form which is sometimes a little slow to process.
 Seems that some of the users are clicking the submit button a whole bunch of
 times and we're getting a few problems arise as a result of it.

 How are you tackling this problem? presumably something with jQuery would be
 nice but I wanted to get your thoughts.

 Any ideas and code examples welcome :-D

 Robert

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305068
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Avoid multiple form submits.

2008-05-09 Thread Robert Rawlins
Hello Guys,

I've got an issue with a form which is sometimes a little slow to process. 
Seems that some of the users are clicking the submit button a whole bunch of 
times and we're getting a few problems arise as a result of it.

How are you tackling this problem? presumably something with jQuery would be 
nice but I wanted to get your thoughts.

Any ideas and code examples welcome :-D

Robert 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304978
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Richard Dillman
cfinput
id=submit
name=submit
type=submit
validate=submitonce /


On 5/9/08, Robert Rawlins [EMAIL PROTECTED] wrote:

 Hello Guys,

 I've got an issue with a form which is sometimes a little slow to process.
 Seems that some of the users are clicking the submit button a whole bunch of
 times and we're getting a few problems arise as a result of it.

 How are you tackling this problem? presumably something with jQuery would
 be nice but I wanted to get your thoughts.

 Any ideas and code examples welcome :-D

 Robert

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304985
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Larry Lyons
Assuming that the user has JavaScript turned on you can use this bit of code, 
it disables the button used for submitting the form once its been clicked:

INPUT TYPE=Button VALUE=Submit onClick=if(this.value == 'Submit') 
this.form.submit(); this.value = 'Please Wait.';this.disabled=true;

hth,
larry

Larry C. Lyons
Web Analyst
American Type Culture Collection
http://www.atcc.org
llyons(at)atcc.org 


 Hello Guys,
 
 I've got an issue with a form which is sometimes a little slow to 
 process. Seems that some of the users are clicking the submit button a 
 whole bunch of times and we're getting a few problems arise as a 
 result of it.
 
 How are you tackling this problem? presumably something with jQuery 
 would be nice but I wanted to get your thoughts.
 
 Any ideas and code examples welcome :-D
 
 Robert 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304993
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Robert Rawlins
Thanks for the suggestions guys,

The JS based solution doenst quite work for me, it seems to grey the button out 
and change the value to 'please wait' but doesnt actualy submit the form :-) 
I've read about this on a few different occasions and appears to be a problem 
with IE7 or something like that, I dont know, any ideas?

As for the cfinput solution, I did try this but when the submit button is 
clicked it doesnt disable itself, is that correct behaviour? or should the 
button become disabed once it has been clicked?

Thanks guys, I appreciate your input (no pun intended.)

Robert 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304994
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Avoid multiple form submits.

2008-05-09 Thread Rich
A client side only solution can not ensure that this problem will not occur.
A more robust solution is to use the Synchronizer Token Pattern from core
J2EE Patterns.

Here is an excerpt from
http://www.corej2eepatterns.com/Design/PresoDesign.htm:

 Synchronizer (or Déjà vu) Token

This strategy addresses the problem of duplicate form submissions. A
synchronizer token is set in a user's session and included with each form
returned to the client. When that form is submitted, the synchronizer token
in the form is compared to the synchronizer token in the session. The tokens
should match the first time the form is submitted. If the tokens do not
match, then the form submission may be disallowed and an error returned to
the user. Token mismatch may occur when the user submits a form, then clicks
the Back button in the browser and attempts to resubmit the same form.

On the other hand, if the two token values match, then we are confident that
the flow of control is exactly as expected. At this point, the token value
in the session is modified to a new value and the form submission is
accepted.




This combined with a client side JS solution will ensure the form is only
submitted once.

HTH,
Rich Kroll
Senior Software Engineer
NextWeb Media
 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304996
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Avoid multiple form submits.

2008-05-09 Thread Massimo Foti
If what you are looking for is just a client-side solution, the TMT 
Validator offers this:
http://www.massimocorner.com/validator/

http://www.massimocorner.com/validator/samples/generic.htm

Massimo 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305001
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Eric Haskins
The Javascript example above doesnt have a TYPE=submit so it will cause
weird behavior in some browsers.

I bet it will work if you add it

Eric

On Fri, May 9, 2008 at 10:52 AM, Massimo Foti [EMAIL PROTECTED]
wrote:

 If what you are looking for is just a client-side solution, the TMT
 Validator offers this:
 http://www.massimocorner.com/validator/

 http://www.massimocorner.com/validator/samples/generic.htm

 Massimo


 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305047
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Gerald Guido
Massimo? As in Massimo The DW Extension Guru?

Awesome!

I just wanted to say thank you SIR!! I have been using your stuff for years.

And thanx for showing up when you did. I was *just* about to write a custom
tag for DHTML Calendar for work.

I looked and noticed that you have not posted any of you work to
riaforge.org. Any reason for this? Yours is a great contribution to the
community, both CF and Web Dev in general, and riaforge.org might serve to
broaden the reach of your contribution.

Just a suggestion. ;)

G


On Fri, May 9, 2008 at 10:52 AM, Massimo Foti [EMAIL PROTECTED]
wrote:

 If what you are looking for is just a client-side solution, the TMT
 Validator offers this:
 http://www.massimocorner.com/validator/

 http://www.massimocorner.com/validator/samples/generic.htm

 Massimo


 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305048
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Avoid multiple form submits.

2008-05-09 Thread Massimo Foti
 Massimo? As in Massimo The DW Extension Guru?

Yes.




 I looked and noticed that you have not posted any of you work to
 riaforge.org. Any reason for this? Yours is a great contribution to the
 community, both CF and Web Dev in general, and riaforge.org might serve to
 broaden the reach of your contribution.

My stuff is typically free, but it's not realesed under an open-source 
license, that's why it's not available from riaforge.org.


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305054
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4