0

How do I disable a button after click in limejs? I have tried using

    this.disable()

but it does not work.

2 Answers2

1

You can also use goog.events.listenOnce. Identical signature to goog.events.listen and will only fire once.

kris
  • 23,024
  • 10
  • 70
  • 79
0

Try goog.events.listen and goog.events.unlisten:

goog.events.listen(my_button, ['mousedown','touchstart'],function_triggered_onClick);
goog.events.unlisten(my_button, ['mousedown','touchstart'],function_triggered_onClick);

goog.events.unlisten will disable the button untill code reaches goog.events.listen again

A Nice Guy
  • 2,676
  • 4
  • 30
  • 54