TextRange objects can only be created for a limited sub-set of the available objects in the MSIE browser. Only objects that can receive input focus are appropriate.
An object somewhere higher up in the hierarchy is referred to by this property. The document hierarchy may have to be traversed upwards for some considerable distance before a suitable object is found, so this hierarchical model is much more sparsely populated than any of the others.
Because text ranges are not supported in the Macintosh, MSIE returns a null value when text ranges and the parentTextEdit property is accessed.
// Locate a textEdit capable parent object and create an all enclosing text range. myParentTextEdit = myElement.parentTextEdit; myTextRange = myParentTextEdit.createTextRange();
See also: | Element object, Hierarchy of objects, TextRange object |
Prev | Home | Next |
Element.parentNode | Up | Element.previousSibling |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |