Element.isTextEdit (Property)

A Boolean indication of the text editing capabilities of this element.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:Boolean primitive
JavaScript syntax:IEmyElement.isTextEdit

This property contains a Boolean flag to indicate whether the object can be used to create a TextRange object. This is done with the createTextRange() method. Only the following object classes should yield a true value for this property:

If the HTML element represents an <INPUT> tag whose type is TEXT for example, then this value will yield true. Most of the time it will yield false. It is useful for writing generic accessors and handlers for objects which may or may not have selectable or editable text in them.

Logically you would only want to read from this property.

The value yielded by this property will be true if the element represents an editable text field and false if is not.

Example code:

   // An example showing how a text range can be created

   // conditionally

   if(myElement.isTextEdit)

   {

      myElement.createTextRange();

   }

See also:BODY object, Button object, BUTTON object, Element object, Input.createTextRange(), TEXTAREA object, TextCell object, TextRange object

Property attributes:

ReadOnly.