The setDisabled() method makes the button disabled, so it can't be clicked. Recommended to use in button's ClientBefore event.
Syntax
ajax.setDisabled();
Arguments
No arguments.
Return value
No return value.
Example
Let's say you want to add a Custom button where the Server event needs to be delayed by 5 seconds. To prevent users from clicking the button while the delay takes place, you can disable the button.
Add the following code in the beginning of ClientBefore event.
ajax.setDisabled();
See also:
•JavaScript API: AJAX helper object > setEnabled()
•Tri-part events: Asynchronous tasks
•JavaScript API: AJAX helper object