|
November 24, 2001 Disabling A Button Tips: November 2001
Yehuda Shiran, Ph.D.
|
|
Sometimes, you may want to disable a button from JavaScript. You need to, for example, when the service called by the button is not available. A Web service called synchronously should not be called again while working on its previous call. Play around with the following two buttons. Toggle the second button with the first one:
The first button toggles the disability of the button below it, through the toggleOtherButton() function:
Here is the whole JavaScript code:
People who read this tip also read these tips: Look for similar tips by subject: |