User Guide

282 Chapter 14: Document
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.
dom.setSelection()
Availability
Dreamweaver 3.
Description
Sets the selection in the document.
Arguments
offsetBegin
, offsetEnd
These arguments are the opening and closing points, respectively, for the new selection, which
is expressed as character offsets into the documents source code. If the two numbers are the
same, the new selection is an insertion point. If the new selection is not a valid HTML
selection, it is expanded to include the characters in the first valid HTML selection. For
example, if
offsetBegin and offsetEnd define the range SRC="myImage.gif" within <IMG
SRC="myImage.gif">
, the selection expands to include the entire IMG tag.
Returns
Nothing.
000_DW_API_Print.book Page 282 Wednesday, August 20, 2003 9:14 AM