For instance, the code for a Browse button often reads as follows:
onClick=???browseFile(document.theForm.textFile.value)???> The browseFile() function then calls the built-in browseForFileURL() function, which opens the Select File dialog box and, if the dialog box is returned with a filename, assigns that filename to a variable. In the standard browseFile() function, shown here, the returned filename is then assigned to a text-box value for the given field, which makes the name appear in the text box: function browseFile(fieldToStoreURL) { var fileName = ??????; fileName = browseForFileURL() //returns a local filename if (fileName) fieldToStoreURL.value = fileName; } BC 46 Creating a Behavior The dreamweaver.getDocumentPath() function Dreamweaver includes several local document functions that aid in the reading, editing, and storing of current and external documents. The getDocumentPath() function is one of these; as the name states, this function returns the path of the specified document. The path returned is in the file://URL format, so that a file located at c:\sites\index.html returns file://c|/sites/ as its path. The getDocumentPath() function takes one argument: the source document.