var isLoading = false //semaphore for tracking status of the request
var myFormAction = function(){
 if (!isLoading){
    isLoading = true;
    // perform my form action
}};

...then set isLoading = false in your onSuccess.

Johnny Fuery
President/Principal Engineer
Fuery Solutions -- makers of MerusCase
1736 Franklin Street, Suite 350
Oakland, CA 94612
925.997.3878 Direct/Mobile
925.997.4107 Main
510-836-0915 Fax
[email protected]



On Sun, Aug 1, 2010 at 3:03 PM, Sid-ahmed D <[email protected]> wrote:
> Hi,
>
> How do you block the action of a function when it is started and
> reactivate when the application is completed?
>
> http://jsfiddle.net/6UqAP/
>
> Imagine that the query takes 10 seconds to appear, if I continue to
> click the go button .. other requests are sent to the server.
>
> Is there a way to block the function without changing the name of the
> ID?
>

Reply via email to