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 1925 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

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.


Pages:
1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937