165Chapter 15 .Generic HTML Element Objects fireEvent() and (Unlimited web hosting)

165Chapter 15 .Generic HTML Element Objects fireEvent() and dispatchEvent(), the two methods diverge significantly in advanced applications (for example, the way events can propagate and the W3C notion of an Eventobject). Example (with Listing 15-26) on the CD-ROM Related Item: dispatchEvent() method. focus() See blur(). getAdjacentText( position ) Returns: String. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility The getAdjacentText() method enables you to extract plain text components of an element object (in other words, without any HTML tag information). This method is not implemented in IE5/Mac. The sole parameter is one of four case- insensitive string constant values that indicate from where, in relation to the current object, the text should be extracted. The values are: Parameter Value Description beforeBegin Text immediately in front of the element s tag, back to the preceding tag afterBegin Text that begins inside the element tag, up to the next tag (whether it be a nested element or the element s end tag) beforeEnd Text immediately in front of the element s end tag, back to the preceding tag (whether it be a nested element or the element s start tag) afterEnd Text immediately following the element s end tag, forward until the next tag If the current object has no nested elements, then the afterBeginand beforeEnd versions both return the same as the object s innerText property. When the current object is encased immediately within another element (for example, a TD element inside a TR element), there is no text before the element s beginning or after the element s end so these values are returned as empty strings. On the CD-ROM elementObject.getAdjacentText()
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Leave a Reply