Web hosting plans - 390 Part III . Document Objects Reference getSelection()
January 19th, 2008390 Part III . Document Objects Reference getSelection() Returns: String. Compatibility NN2 NN3 NN4 . NN6 . IE3/J1 IE3/J2 IE4 IE5 IE5.5 Many Web browser users aren t aware that they can select and copy body text in a document for pasting into other application documents. Even so, NN4+ offers a scripted way of capturing the text selected by a user in a page. The document. getSelection() method returns the string of text selected by the user. If nothing is selected, an empty string is the result. Returned values consist only of the visible text on the page and not the underlying HTML or style of the text. The IE4+ equivalent involves the document.selectionproperty, which returns an IE selection object (not implemented in IE5/Mac). To derive the text from this object, you must create a TextRangeobject from it and then inspect the text property: var selectedText = document.selection.createRange().text On the Example on the CD with Listing 18-15 CD-ROM Related Items: document.selection property. handleEvent(event) Returns: Nothing. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . When you explicitly capture NN4 events in the window, document, or layer object (by invoking the captureEvents() method for that object), you can control where the events go after their initial capture. To let an event continue to its original target (for example, a button that is clicked by a user), you use the routeEvent()method. But if you want to redirect an event (or class of events) to a particular event handler elsewhere in the document, use the handleEvent()method. See the discussion of the handleEvent() method for the windowobject in Chapter 16. The behavior of the handleEvent() method for all objects is the same. Related Items: document.captureEvents(), document.releaseEvents(), document.routeEvent() methods; event object (Chapter 29). document.handleEvent()
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.