Search DaTutorials:  
HOME
DHTML Reference
Introduction
Reference

isDisabled Property


Retrieves the value indicating whether the user can interact with the object.

Syntax

HTMLN/A
Scripting[ bDisabled = ] object.isDisabled

Possible Values

bDisabledBoolean that receives one of the following values.
falseUser can interact with the object.
trueUser cannot interact with the object.

The property is read-only. The property has no default value.

Example

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>

Standards Information

There is no public standard that applies to this property.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, nextID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, styleSheet, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XML, XMP

     Ringtones | MySpace Layouts | Debt Consolidation | Electricity Suppliers | Cheap Magazines
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp