Adobe 38040334 - Dreamweaver CS3 User Manual page 309

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Arguments
code, insideHead
is a string containing the JavaScript code to be inserted into the page
code
is a Boolean value that indicates whether to insert the JavaScript block in the head or in the body.
insideHead
The default is
, which inserts the code in the head. If
true
before the
tag. This argument is optional.
</body>
Returns
Nothing.
Example
function objectTag()
{
.
.
.
var dom = dw.getDocumentDOM();
var id = dwscripts.getUniqueId("accordion");
var code = "new Accordion('" + id + "',250,{duration:200,step:20})";
dom.addJavaScript(code, false);
return retVal;
}
dom.copyAssets()
Availability
Dreamweaver CS3.
Description
An extension author can use this API to copy external dependent files to the user's site and add the necessary file
references into the head of the page.
Arguments
assetArray
An array of JavaScript objects. Each JavaScript object has "
" and "
Folder
useRelativeSrc
• "
" is a path relative to the Dreamweaver configuration folder and refers to the asset that the extension
srcURL
author provides. See the "
• "
" is a path relative to the default asset folder of a Dreamweaver site and refers to the location where the
destURL
asset should be copied to. By default, Dreamweaver creates an Assets folder in a site and uses it as the default asset
folder. Users can change the default asset folder when they define a Dreamweaver site. See the "
description in this section.
• "
" is necessary for the extension author to insert a file reference into the head. The valid values for
referenceType
are as follows:
"referenceType"
to insert a
"link"
LINK
to insert a
"import"
" fields.
" description in this section.
useRelativeSrc
tag for an external CSS file
tag with @import
STYLE
, the code is inserted in the body immediately
false
", "
", "
srcURL
destURL
referenceType
DREAMWEAVER CS3
304
API Reference
", "
useDefault-
"
useDefault

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents