User Guide

Selection functions 279
dreamweaver.relativeToAbsoluteURL()
Availability
Dreamweaver 2.
Description
Given a relative URL and a point of reference (either the path to the current document or the site
root), this function converts the relative URL to an absolute file:// URL.
Arguments
docPath
, siteRoot, relURL
The docPath argument is the path to a document on the users computer (for example, the
current document), which is expressed as a file:// URL or an empty string if
relURL is a root-
relative URL.
The siteRoot argument is the path to the site root, which is expressed as a file:// URL or an
empty string if
relURL is a document-relative URL.
The relURL argument is the URL to convert.
Returns
An absolute URL string. The return value is generated, as described in the following list:
If relURL is an absolute URL, no conversion occurs, and the return value is the same
as
relURL.
If relURL is a document-relative URL, the return value is the combination of
docPath + relURL.
If relURL is a root-relative URL, the return value is the combination of siteRoot + relURL.
Selection functions
Selection functions get and set the selection in open documents. For information on getting or
setting the selection in the Site panel, see “Site functions” on page 220.
dom.getSelectedNode()
Availability
Dreamweaver 3.
Description
Gets the selected node. Using this function is equivalent to calling the dom.getSelection()
function and passing the return value to the
dom.offsetsToNode() function.
Arguments
None.
Returns
The tag, text, or comment object that completely contains the specified range of characters.
000_DW_API_Print.book Page 279 Wednesday, August 20, 2003 9:14 AM