Saturday, August 3, 2013

Stopping the Busy Button in DOJO

Stopping the Busy Button in DOJO

Getting the selected rows from DOJO Enhanced Grid :

DOJO busy button will help us to display the Busy Label to user while performing some actions, sometimes we need to stop the busy label and to display the normal button back.

<button data-dojo-type="dojox.form.BusyButton" id="loginButton" style ="margin-top: 10px; margin-right: -8px;" data-dojo-props="busyLabel:'Authenticating...'" onclick="loginForm()">SignIn</button>

If we are clicking on SignIn the button label will be changed to "Authenticating..." and the user will not be able to click the button again but in case of authentication failure the button should be displayed as normal

The below line of code will help as to cancel the busy button.

dijit.byId('loginButton').cancel();   


2 comments:

  1. Works fine for me (with Dojo 1.6), I was looking for this functionnality for a long time,Thanks a lot

    ReplyDelete