MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 208

Extending dreamweaver
Table of Contents

Advertisement

if (whichBrowser == 'primary')
{
result = window.confirm(MSG_NoPrimaryBrowserDefined);
}
else if (whichBrowser == 'secondary')
{
result = window.confirm(MSG_NoSecondaryBrowserDefined);
}
// If the user clicked OK, show the prefs dialog with the browser
panel.
if (result)
dw.showPreferencesDialog('browsers');
}
}
}
The function first sets the variable
. Along with setting other default values, the function also sets
arguments[0]
default value of
false
After variables are initialized, the
function
havePreviewTarget()
function checks to see if the user selected the primary or secondary browser. If so, the function
sets the variable
theBrowser
(
dw.getPrimaryBrowser()
loop that examines the list of browsers returned by
browser in the list matches the path to the primary or secondary browser, the function sets the
variable
theBrowser
the browser and the path to the executable file that starts the browser. If
havePreviewTarget()
the value of the variable
Next, the
receiveArguments()
does not begin with a path, that it is not
If all these conditions are true, and if the Site panel has focus, the
function calls the
site.browseDocument()
files selected in the Site panel. If the Site panel does not have focus, the
function calls the function
document and the value of the variable
with which to open the document.
208
Menus and Menu Commands
whichBrowser
.
receiveArguments()
and tests the result. If the result of the test is true, the
to the path of the executable file that starts the browser
or
dw.getSecondaryBrowser()
to the matching value in
returns the value
false
.
whichBrowser
function tests the variable
"undefined"
dw.browseDocument()
theBrowser
to the value that Dreamweaver passes,
function calls the user-defined
). The function then performs a
dw.getBrowsersList()
. This value contains the name of
browserList
, the function sets the variable
theBrowser
, and that it has a length greater than 0.
function to invoke the selected browser with the
and passes it the path of the current
, which specifies the name of the browser
to a
result
. If the path to a
theBrowser
to make sure that it
receiveArguments()
receiveArguments()
to

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver 8

Table of Contents