Objecttag(), Windowdimensions() – Adobe Extending Dreamweaver CS4 User Manual
Page 129
123
EXTENDING DREAMWEAVER CS4
Insert bar objects
objectTag()
Description
The
objectTag()
and
insertObject()
functions are mutually exclusive: If both are defined in a document, the
objectTag()
function is used. For more information, see “
This function inserts a string of code into the user’s document. Returning an empty string, or a
null
value (also known
as "
return
"), is a signal to Dreamweaver to do nothing.
Note: The assumption is that edits have been made manually before the
return
statement, so doing nothing in this case
is not equivalent to clicking Cancel.
In Dreamweaver, if the focus is in Code view and the selection is a range (meaning that it is not an insertion point),
the range is replaced by the string that the
objectTag()
function returns. This is the value
true
, even if the
objectTag()
function returns an empty string or returns nothing. The
objectTag()
function returns an empty
string or a
null
value because edits to the document have already been made manually. Otherwise, double quotation
marks (" ") often delete the edit by replacing the selection.
Arguments
None.
Returns
Dreamweaver expects the string to insert into the user’s document.
Example
The following example of the
objectTag()
function inserts an
OBJECT/EMBED
combination for a specific ActiveX
control and plug-in:
function objectTag() {
return '\n' +
''
}
windowDimensions()
Description
This function sets specific dimensions for the Options dialog box. If this function is not defined, the window
dimensions are computed automatically.
Note: Do not define this function unless you want an Options dialog box that is larger than 640 x 480 pixels.
Arguments
platform
•
The value of the platform argument is either
"macintosh"
or
"windows"
, depending on the user’s platform.