Re: Prevent Submit Button Clicked Twice/ Prevent Double Click

Travis Britt <[email protected]> Wed, 15 Apr 2009 12:50:19 -0400
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
I like Chuck's suggestion of using a flag in your WOComponent code.  
Probably the most iron-clad solution.

Another way to handle this is to use CSS/JS and create a busy div, a  
div with content that indicates work is being done. Initially set its  
display to none so it's not visible. When a button is clicked hide the  
button(s) and show the busy div.

If you are using Ajax and Project Wonder AjaxBusyIndicator may be of  
use to you.

tb

On Apr 15, 2009, at 12:32 PM, Federico Cattozzi wrote:

> Hi,
> i'm italian developer and i'm new member of this mailing list.
> I have a problem with WO: in a my application there is a booking  
> wizard composed by a sequence of components, from a component to the  
> next i send some data with a form with attribute "multipleSubmit =  
> true;" (because the are two WOSubmitButton, one to undo and one to  
> continue), good, how can i prevent a submit button to click twice?
> Setting WOAllowsConcurrentRequestHandling=false property seems  
> doesn't help me.
> Using Javascript like this onclick = "this.disabled=true;  
> this.submit();" to disable the button while the component is  
> calculating, blocks the submitting.