Preventing multiple clicks on a button?

Forum to discuss the Web client version of Servoy.

Preventing multiple clicks on a button?

Postby adamk » Thu Jul 19, 2007 10:11 pm

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
adamk
 
Posts: 35
Joined: Sat Jun 30, 2007 2:33 am
Location: Lynnfield, MA

Postby ngervasi » Fri Jul 20, 2007 2:38 am

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.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Postby Westy » Fri Jul 20, 2007 3:12 pm

ngervasi wrote: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 wrote: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
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Preventing multiple clicks on a button?

Postby nromeou » Wed Dec 09, 2009 5:46 pm

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
 
Posts: 215
Joined: Fri Sep 18, 2009 8:38 pm
Location: Montevideo, Uruguay

Re: Preventing multiple clicks on a button?

Postby ngervasi » Thu Dec 10, 2009 2:44 pm

nromeou wrote: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
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Preventing multiple clicks on a button?

Postby nromeou » Fri Dec 11, 2009 1:46 pm

Thank you very much Nicola.
This is really helpful. :D
nromeou
 
Posts: 215
Joined: Fri Sep 18, 2009 8:38 pm
Location: Montevideo, Uruguay


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 3 guests