Adobe 38040334 - Dreamweaver CS3 User Manual page 349

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

Advertisement

Description
Dreamweaver performs two translation passes. The first pass goes through all the translators and calls the
functions. After those functions are called, the second pass calls the
lateMarkup()
passed in is the
to translate. The only edits that are allowed during the second pass are those dealing with
dom
dom
translated attributes.
Arguments
dom, sourceStr
• The
argument.
dom
• The
argument is the same string passed into
sourceStr
translation should be done on the
Returns
Dreamweaver expects nothing.
Example
translateDOM( dom, sourceStr );
The following instance of the
function translateDOM(dom, sourceStr){
var div1 = dom.getAttributeById("div1");
if (div1){
div1.style.display = "none";
}
}
translateMarkup()
Description
This function performs the translation.
Arguments
,
,
docName
siteRoot
docContent
• The
argument is a string that contains the file:// URL for the document to be translated.
docName
• The
argument is a string that contains the file:// URL for the root of the site that contains the document
siteRoot
to be translated. If the document is outside a site, this string might be empty.
• The
argument is a string that contains the contents of the document.
docContent
Returns
A string that contains the translated document or an empty string if nothing is translated.
Example
The following instance of the
contained in a dynamic link library (DLL) (Windows) or a code library (Macintosh) called ASPTrans:
argument, not the
dom
//returns nothing
function hides the tag with ID
translateDOM()
function calls the C function
translateMarkup()
translateDOM()
. It's provided for reference, but all
translateMarkup
argument
sourceStr
.
in the document.
div1
translateASP()
DREAMWEAVER CS3
343
Extending Dreamweaver
trans-
functions. The
, which is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents