Preventing multiple clicks on a button?

Is there a way to disable, once it has been clicked, a button on a form viewed in the web client? The button needs to be disabled instantly because I want to prevent both double-clicks and multiple single clicks. To be that fast, the disabling action would probably need to be done at the HTML level, not in the method the button’s onAction value calls. Besides, I already tried disabling the button in the method, but the button only becomes disabled in the smart client, not the web client.
It would be great if the button could be re-eneabled after a certain length of time, maybe 4 seconds.

Servoy 3.0.1
Java 1.5.0_05-b05
Windows 2003

With 3.5 you can disable it in webclient as well (if I remember right) using the onAction method, and if you put a scheduled job when the buttons is clicked the first time you could re-enable it later.
The real problem in my opinion is the speed of all this, if your users are too quick it wouldn’t be effective.
Anyway, in my opinion, since a webclient application is tailored to a limited set of users, the best approach is to educate users to single click every single button; you can’t take care of all the possible mistakes they could do because they’re endless. Notice how fast people learned to single click and wait for results when they input their credit card number in web form ;)
One thing that I usually do when developing in webclient though, is to open the start screen of the app in a new popup web page and disable navigation controls: people tend to use back, forward and refresh buttons too much and that could be dangerous in webclient. I also don’t like showing them the application URL.

Just my 2 cents.

ngervasi:
since a webclient application is tailored to a limited set of users…

Hi Nicola. A multi-tenant web client solution can have a very large number of users.

ngervasi:
the best approach is to educate users to single click every single button…

I am not sure that this is really the best approach. From my observation of users, a high percentage of them double-click all buttons because they do not differentiate between a solution that runs within a browser and one that does not. In many cases telling them to change their behavior is futile because they do not realize that they are double-clicking. They will shake their head agreeing not to double-click any more, but they will soon revert back to their old behavior without realizing it.

For this reason I think that the webclient should by default only accept the first click when a button or link is double-clicked.

Dean

Hi all,

I am in need of keeping the navigation controls from browser as disabled.
As Nicola said before, it would be complicated to keep them enabled for my solution.
Nicola would you mind explaining how to do that.
I’ve been looking for a way to do this for a while now, but with no success.
Is it possible with Servoy 4.1.4 or Servoy 5.0 ?

Thanks

nromeou:
I’ve been looking for a way to do this for a while now, but with no success.
Is it possible with Servoy 4.1.4 or Servoy 5.0 ?

Thanks

Sure, have a look at my Servoy World 2008 presentations, you can download them from my website: http://www.sintpro.com/downloads_eng.php

Thank you very much Nicola.
This is really helpful. :D