dojox.form.BusyButton¶
Status: | Draft |
---|---|
Version: | Beta |
Author: | Nikolai Onken |
BusyButton is a simple widget which provides implementing more user friendly form submission. When a form gets submitted bu a user, many time it is recommended to disable the submit buttons to prevent double submittion. BusyButton provides a simple set of features for this purpose
Examples¶
The first example shows you how to create a nifty button programatically
This example show how to use the busy button without internal timeout. Once you receive a server response from the server (than can include a timeout from the server) you can and should change the status of the button.
The following example has a built-in timeout.
In this example we will set a new label by clicking on a button (this can be a server response as well). The first state will not have a timeout, the second state will have a timeout of 2 seconds
The last example uses a little bit of trickery to create a button which is disabled initially and enabled after the timeout. This sort of button is very hand for license agreements or times when you want to be sure the user can’t submit a form (usually forcing a user to read the license agreement doesn’t work, but its worth a try). The chance is high that the button already is not disabled anymore - just reload the page and scroll to this example real quick.