dreamweaver.browseForFileURL()
dreamweaver.browseForFileURL()
This function has eight arguments, described here, rather than five as described in Help.
Availability
Dreamweaver 1, enhanced in 2, 3, and 4.
Description
Opens the specified type of dialog box with the specified label in the title bar.
Arguments
openSelectOrSave, {titleBarLabel}, {bShowPreviewPane}, {bSupressSiteRootWarnings}, {arrayOfExtensions}, [startFolder], [dynamicURLs], [browseURL]
- The
openSelectOrSave
argument is a string that indicates the type of dialog box as "open"
, "select"
,"select_dynamic",
or "save"
. - The
titleBarLabel
argument (added in Dreamweaver 2) is the label that should appear in the title bar of the dialog box. If this argument is omitted, Dreamweaver uses the default label that the operating system supplies. - The
bShowPreviewPane
argument (added in Dreamweaver 2) is a Boolean value that indicates whether to display the Image Preview Pane in the dialog box. If this argument is a value oftrue
, the dialog box filters for image files; if omitted, it defaults to a value offalse
. - The
bSupressSiteRootWarnings
argument (added in Dreamweaver 3) is a Boolean value that indicates whether to suppress warnings about the selected file being outside the site root. If this argument is omitted, it defaults to a value offalse
. - The
arrayOfExtensions
argument (added in Dreamweaver 4) is an array of strings for specifying default content for the Files of type list menu at the bottom of the dialog box. The proper syntax ismenuEntryText|.xxx[;.yyy;.zzz]|CCCC|
, wheremenuEntryText
is the name of the file type to appear. The extensions can be specified as.xxx[;.yyy;.zzz]
orCCCC
, where.xxx
specifies the file extension for the file type (optionally,.yyy
and.zzz
specify multiple file extensions) andCCCC
is the four-character file type constant for the Macintosh. - The
startFolder
argument is a String that specifies the name of a folder in which to start browsing. - The
dynamicURLs
argument is a Boolean value that specifies whether dynamic URLs or parameters are allowed. If this argument is omitted, defaults tofalse
. - The
browseURL
is a String that specifies the URL with which to browse.
Returns
A string that contains the name of the file, which is expressed as a file:// URL.
Example
The following example opens a dialog box that allows you to browse and select a file to open.
<script> dw.browseForFileURL("open","Choose file to open", false); </script>