Adobe 38040334 API Reference - Page 263
dom.selectAll, dom.setSelectedNode, Performs a Select All operation.
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 263 highlights
DREAMWEAVER CS3 258 API Reference var offsets = dom.getSelection(); var theSelection = dreamweaver.offsetsToNode(offsets[0], ¬ offsets[1]); if (theSelection.nodeType == Node.ELEMENT_NODE && ¬ theSelection.tagName == 'IMG'){ alert('The current selection is an image.'); } dom.selectAll() Availability Dreamweaver 3. Description Performs a Select All operation. Note: In most cases, this function selects all the content in the active document. In some cases (for example, when the insertion point is inside a table), it selects only part of the active document. To set the selection to the entire document, use dom.setSelection(). Arguments None. Returns Nothing. dom.setSelectedNode() Availability Dreamweaver 3. Description Sets the selected node. This function is equivalent to calling the dom.nodeToOffsets() function and passing the return value to the dom.setSelection() function. Arguments node, {bSelectInside}, {bJumpToNode} • The node argument is a text, comment, or element node in the document. • The bSelectInside argument, which is optional, is a Boolean value that indicates whether to select the innterHTML of the node. This argument is relevant only if node is an element node, and it defaults to false if it is omitted. • The bJumpToNode argument, which is optional, is a Boolean value that indicates whether to scroll the Document window, if necessary, to make the selection visible. If it is omitted, this argument defaults to false. Returns Nothing.