SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1929 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

The example offered here shows how to use the two functions
together to programmatically display Dreamweaver??™s InsertMenu.htm file:
function displayMenu() {
var menuPath = dreamweaver.getConfigurationPath() +
???/Objects/InsertMenu.htm???;
dreamweaver.browseDocument(menuPath);
}
The dreamweaver.openDocument() and dreamweaver.createDocument() functions
The openDocument() and createDocument() functions provide similar capabilities although they
possess similar restrictions. The openDocument() function is equivalent to selecting File ??? Open and
selecting a file from the Open dialog box. The createDocument() function, as the name implies, creates
a new, blank document, based on the standard default.htm file. In either case, the document loads into
a Dreamweaver window and is brought forward.
The createDocument() function does not need an argument to work and automatically returns the
DOM of the new document. For example, the following code
var theNewDoc = dreamweaver.createDocument();
is the same as using getDocumentDOM() for a new page.
The openDocument() function requires an argument in the form of a file://URL. If the URL is given in relative
terms, the file is relative to the extensibility file calling the function. For instance, to open a file located
one directory up from the Commands folder, you need to refer to it as follows in a custom command:
dreamweaver.


Pages:
1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941