0

Autodisable Label/Image

asked 2017-01-18 13:13:00 +0800

IngoB gravatar image IngoB flag of Germany
256 6

Hi,

I got a problem with modal windows and onClick Events on components other than buttons.

Example: Label "Reset password?", which opens a modal window (to enter email) on a simple click. Some users are impatient and "double click", so the modal window is opened twice.

I know that a button has a feature "autodisable", but I need it for a label or an image.

Does anyone got an idea how to solve this?

P.S.: ZK 8, FF 50+

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-18 14:24:07 +0800

Darksu gravatar image Darksu
1991 1 4

Hello IngoB,

As a suggestion:

  1. Create a date variable in your controller in order to store the time the click event was triggered
  2. In the method that the event was triggered check the value of the previous trigger. If for example it is less that a second then do now allow any actions to be made. Else update the date variable and proceed with the flow.

This should work for all.

Best Regards,

Darksu

link publish delete flag offensive edit

Comments

Thank you! This is working very well, but I hoped for a more generic solution :)

IngoB ( 2017-01-18 15:05:59 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-01-18 13:13:00 +0800

Seen: 18 times

Last updated: Jan 18 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More