6 out of 7 rated this helpful - Rate this topic

isDisabled property

[This documentation is preliminary and is subject to change.]

Gets the value that indicates whether the user can interact with the object.

Syntax

JavaScript

p = object.isDisabled

Property values

Type: Boolean

VARIANT_FALSE (false)

User can interact with the object.

VARIANT_TRUE (true)

User cannot interact with the object.

Examples

The following example shows how to use the isDisabled property to determine whether an object is disabled.


<HEAD>
<SCRIPT>
function chgInput() {
    currentState = oTextInput.isDisabled;
    newState = !currentState;
    oTextInput.disabled = newState;
    oCurrentValue.innerText = newState;
    newState==true ? oBtn.innerText="Enable" : oBtn.innerText="Disable"
}
</SCRIPT>
</HEAD>
<BODY onload="oCurrentValue.innerText = oTextInput.isDisabled;">
<P>Click the button to enable or disable the <B>INPUT</B>.</P>
<P>
<INPUT ID="oBtn" TYPE="button" VALUE="Disable" onclick="chgInput()" />
</P>
<P><INPUT ID="oTextInput" VALUE="This is some text." /></P>
Input disabled: <SPAN ID="oCurrentValue"></SPAN>
</BODY>

 

 

Build date: 3/8/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ