User Guide
Selection functions 339
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.
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.
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().
000_DW_API_Print.book Page 339 Wednesday, July 20, 2005 11:58 AM