467Chapter 19 .Body (Virtual web hosting) Text Objects not the document,

467Chapter 19 .Body Text Objects not the document, which may have been scrolled to a different position. Invoking the moveToPoint()method is the scripted equivalent of the user clicking that spot in the window. Use the expand()method to flesh out the collapsed text range to encompass the surrounding character, word, or sentence. Using the moveToPoint() method on a text range defined for a text form control may cause a browser crash. The method appears safe with the document.body text ranges, even if the x,y position falls within the rectangle of a text control. Such a position, however, does not drop the text range into the form control or its content. Example on the CD-ROM On the CD-ROM Note Related Items: TextRange.move(), TextRange.moveStart(), TextRange.moveEnd() methods. parentElement() Returns: Element object reference. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . The parentElement() method returns a reference to the next outermost HTML element container that holds the text range boundaries. If the text range boundaries are at the boundaries of a single element, the parentElement() method returns that element s reference. But if the boundaries straddle elements, then the object returned by the method is the element that contains the text of the least- nested text portion. In contrast to the expand() and various move-related methods, which understand text constructs, such as words and sentences, the parentElement() method is concerned solely with element objects. Therefore, if a text range is collapsed to an insertion point in body text, you can expand it to encompass the HTML element by using the parentElement() method as a parameter to moveToElementText(): rng.moveToElementText(rng.parentElement()) On the CD-ROM Example on the CD-ROM Related Items: TextRange.expand(), TextRange.move(), TextRange. moveEnd(), TextRange.moveStart() methods. TextRange.parentElement()
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Leave a Reply