Adobe 38040334 - Dreamweaver CS3 User Manual page 159

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

The
getDynamicContent()
names that have been specified in the Preview In Browser section of the Preferences dialog box. This array contains
the name of each browser and the path to the executable file. Next, for each item in the array
, the
i=i+2)
getDynamicContents()
(
browsers
browsers[j] = new String(PIB[i]);
secondary browser, the function appends the names of the keyboard shortcut keys that invoke them. Next it appends
the string
followed by the name of the browser in single quotation marks (for example,
";id="
If the
argument is "
itemID
After it constructs an entry for each browser listed in the Preferences dialog box, the
in.
function returns the array
value
, and Dreamweaver displays No Browsers Selected in the menu.
null
canAcceptCommand()
Dreamweaver next calls the
with the
attribute. If the
file
If the
canAcceptCommand()
function returns
or is not defined, Dreamweaver calls the
true
whether to display a check mark next to the menu item. If the
check mark appears.
function canAcceptCommand()
{
var PIB = dw.getBrowserList();
if (arguments[0] == 'primary' || arguments[0] == 'secondary')
return havePreviewTarget();
return havePreviewTarget() && (PIB.length > 0);
}
The
canAcceptCommand()
the Preferences dialog box. Then it checks whether the first argument (
so, it returns the value returned by the
function and tests whether any browsers have been specified (
viewTarget()
true, the function returns the value
havePreviewTarget()
The
havePreviewTarget()
valid target to display in the browser. A valid target is a document or a selected group of files in the Site panel. The
function looks like the following example:
havePreviewTarget()
function havePreviewTarget()
{
var bHavePreviewTarget = false;
if (dw.getFocus(true) == 'site')
{
if (site.getFocus() == 'remote')
{
bHavePreviewTarget = site.getRemoteSelection().length > 0 &&
}
function calls the
dw.getBrowserList()
function moves the name of the browser (
", the function prefixes the array item with the string
DWPopup_PIB_Default
to Dreamweaver. If no browsers have been selected, the function returns the
browsers
function for each
canAcceptCommand()
canAcceptCommand()
function returns the value
function in the PIB_Dynamic.js file again retrieves the browser list that was created in
havePreviewTarget()
. If either or both of the tests are false, the function returns the value
true
function is a user-defined function that returns the value
site.canBrowseDocument();
function to obtain an array of the browser
). If the browser has been designated as the primary or
menuitem
function returns the value
, Dreamweaver enables the item on the menu. If the
true
isCommandChecked()
isCommandChecked()
arguments[0]
function. If not, it tests the call to the
PIB.length > 0
DREAMWEAVER CS3
Extending Dreamweaver
(i=0; i<PIB.length;
) into a second array called
PIB[i]
;id='iexplore')
Preview
getDynamicContent()
tag that references a command file
, the menu item is dimmed.
false
function to determine
function is not defined, no
) is primary or secondary. If
havePre-
). If both tests are
if Dreamweaver has a
true
153
.
.
false

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents