User Guide

334 Document
dreamweaver.getDocumentPath()
Availability
Dreamweaver 1.2.
Description
Gets the path of the specified document, which is expressed as a file:// URL. This function is
equivalent to calling
dreamweaver.getDocumentDOM() and reading the URL property of the
return value.
Arguments
sourceDoc
The value of the sourceDoc argument must be "document", "parent",
"parent.frames[number]", or "parent.frames['frameName']". The "document"
value specifies the document that has the focus and contains the current selection. The
"parent" value specifies the parent frameset (if the currently selected document is in a
frame), and the
"parent.frames[number]" and "parent.frames['frameName']"
values specify a document that is in a particular frame within the frameset that contains
the current document.
Returns
Either a string that contains the URL of the specified document if the file was saved or an
empty string if the file was not saved.
dreamweaver.getSiteRoot()
Availability
Dreamweaver 1.2.
Description
Gets the local root folder (as specified in the Site Definition dialog box) for the site that is
associated with the currently selected document, which is expressed as a file:// URL.
Arguments
None.
Returns
Either a string that contains the URL of the local root folder of the site where the file is saved
or an empty string if the file is not associated with a site.
000_DW_API_Print.book Page 334 Wednesday, July 20, 2005 11:58 AM