Adobe 38040334 - Dreamweaver CS3 User Manual page 350

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

Advertisement

function translateMarkup(docName, siteRoot, docContent){
var translatedString = "";
if (docContent.length > 0){
translatedString = ASPTrans.translateASP(docName, siteRoot, ¬
docContent);
}
return translatedString;
}
For an all-JavaScript example, see "A simple attribute translator example" on page 334 or "A simple block/tag trans-
lator example" on page 337.
liveDataTranslateMarkup()
Availability
Dreamweaver UltraDev 1.
Description
This function translates documents when users are using the Live Data window. When the user selects the View >
Live Data command or clicks the Refresh button, Dreamweaver calls the
instead of the
translateMarkup()
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
is contained in a DLL (Windows) or a code library (Macintosh) called ASPTrans:
function liveDataTranslateMarkup(docName, siteRoot, docContent){
var translatedString = "";
if (docContent.length > 0){
translatedString = ASPTrans.translateASP(docName, siteRoot, docContent);
}
return translatedString;
}
function.
liveDataTranslateMarkup()
liveDataTranslateMarkup()
function calls the C function
DREAMWEAVER CS3
Extending Dreamweaver
function
, which
translateASP()
344

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents