Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > AJAX helper object > Methods

JavaScript API: AJAX helper object > setDisabled()

Scroll Prev Next More

 

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

Dialog API

PDF API

JavaScript API: AJAX helper object

About JavaScript API