MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifications

Browse online or download Specifications for Software MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API. MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifications User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 692
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
macromedia
®
Extending Dreamweaver MX
Page view 0
1 2 3 4 5 6 ... 691 692

Summary of Contents

Page 1 - Extending Dreamweaver MX

macromedia™®Extending Dreamweaver MX

Page 3 - CONTENTS

Chapter 8100Examplefunction showif(){var retval = false;var dom = dw.getDocumentDOM();if(dom){var view = dom.getView();if(view == ‘design’){retval = t

Page 4 - Extension APIs

To o l b a r s 101The file attribute in this text box item causes Dreamweaver to invoke the Toolbars/MM/EditTitle.htm command file when the user inter

Page 5

Chapter 8102

Page 6

103CHAPTER 9ReportsYou can use the Reports API functions to create custom site reports or modify the set of prewritten reports that come with Dreamwea

Page 7

Chapter 91044 After the reports are selected and their settings are set, the user clicks the Run button. At this point, Dreamweaver clears all items f

Page 8 - Contents8

Reports 105ReturnsDreamweaver expects nothing.beginReporting()DescriptionCalled at the start of the reporting process, before any reports are run. If

Page 9 - Overview

Chapter 9106ExampleThe following instance of commandButtons() defines three buttons: OK, Cancel, and Help.function commandButtons(){return new Array(&

Page 10

107CHAPTER 10Tag Libraries and EditorsDreamweaver MX users can use tag editors to insert new tags, edit existing tags, and access reference informatio

Page 11 - Introduction

Chapter 10108The following example illustrates the structure of the TagLibraries.vtm file:<taglibraries><taglibrary name="Name of tag li

Page 12 - Chapter 112

Tag Libraries and Editors 109The following table lists tagref attributes:Because the tagref.prefix attribute can override taglibrary.prefix, the relat

Page 13 - Results windows

11CHAPTER 1IntroductionThis book contains descriptions of the tools that are available for developers to extend Dreamweaver using Dreamweaver applicat

Page 14

Chapter 10110The following table lists the attributes that define tags: Attribute Description Mandatory/optionaltag.bind Used by the Data Binding pane

Page 15 - XHTML document types

Tag Libraries and Editors 111Note: In versions before Dreamweaver MX, tag information is stored in the Configuration/TagAttributeList.txt file. The Ta

Page 16 - Flash Integration

Chapter 10112TagChooser.xml files are stored in Configuration/TagLibraries/TagLibraryName folder. The following example illustrates the structure of T

Page 17 - CHAPTER 2

Tag Libraries and Editors 113The ELEMENT tag represents the tag to insert, with attributes as described in the following table:Creating a new tag edit

Page 18 - Chapter 218

Chapter 10114For Windows NT platforms: <drive>:\WinNT\profiles\<username>\ ¬Application Data\Macromedia\Dreamweaver MX\Configuration For M

Page 19 - Extending Dreamweaver MX 19

Tag Libraries and Editors 115Creating a tag editor UITo create the CFWEATHER tag editor user interface:1 Save the following file as Configuration/Tagl

Page 20

Chapter 10116<div name="General"> <table border="0" cellspacing="4"> <tr> <td valign=&qu

Page 21 - Data Translator

Tag Libraries and Editors 117• The <cfweather> tag appears in the list box on the right. • Select cfweather, and click the Insert button. The ta

Page 22 - Chapter 222

Chapter 10118ReturnsDreamweaver expects a Boolean value: true if the input for HTML form elements is valid; false if input values are not valid. Examp

Page 23 - Extending Dreamweaver MX 23

119CHAPTER 11Property InspectorsThe Property inspector is perhaps the most familiar floating panel in the Dreamweaver interface. It is indispensable f

Page 24 - Chapter 224

Chapter 1124 Save the extension package in the Dreamweaver MX\Downloaded Extensions folder of your installed Dreamweaver folder. 5 In the Extension Ma

Page 25 - Extending Dreamweaver MX 25

Chapter 11120In some cases, you might want to specify that your extension use only Dreamweaver MX extension rendering (and not the previous rendering

Page 26 - Chapter 226

Property Inspectors 121The Property inspector APITwo of the Property inspector API functions (canInspectSelection() and inspectSelection()) are requir

Page 27 - Extending Dreamweaver MX 27

Chapter 11122inspectSelection()DescriptionRefreshes the contents of the text fields based on the attributes of the current selection.ArgumentsmaxOrMin

Page 28 - Chapter 228

Property Inspectors 123A simple Property inspector exampleThe following Property inspector inspects a fictional tag called INTJ. The INTJ tag is empty

Page 29 - Extending Dreamweaver MX 29

Chapter 11124 var theObj = theDOM.getSelectedNode(); // Get the index of the selected option in the pop-up menu // in the interface var typeInde

Page 30 - Chapter 230

125CHAPTER 12Floating PanelsYou can create any kind of floating panel or inspector without the size and layout limitations of Property inspectors. Alt

Page 31 - CHAPTER 3

Chapter 12126When one of the files inside the Configuration folder calls dw.getFloaterVisibility(floaterName), dw.setFloaterVisibility(floaterName), o

Page 32 - to assign names

Floating Panels 127displayHelp()DescriptionIf this function is defined, a Help button appears below the OK and Cancel buttons in your dialog box. This

Page 33

Chapter 12128getDockingSide()AvailabilityDreamweaver MX (Windows only)DescriptionSpecifies the locations at which a floating panel can dock. The funct

Page 34 - Chapter 334

Floating Panels 129initialTabs()DescriptionDetermines which other floating panels are tabbed together the first time that this floating panel appears.

Page 35 - JavaScript functions:

Introduction 13What’s new in Extending Dreamweaver MXDreamweaver MX includes the following new features and interfaces that you can access to develop

Page 36 - or collapse

Chapter 12130isAvailableInCodeView()DescriptionDefined by a floating panel to determine whether the floating panel should be enabled when Code view is

Page 37

Floating Panels 131ExampleThe following example of selectionChanged() shows a different layer in the floating panel, depending on whether the selectio

Page 38 - Chapter 338

Chapter 12132The following example is from a floating panel that displays information about every layer in the document. It uses setTimeout() to pause

Page 39

Floating Panels 133A simple floating panel exampleThe following floating panel example contains a text field that shows the contents of the selected S

Page 40 - Adding nodes

Chapter 12134</form></div></body></html>Remember that it is not sufficient to save this code in a file called scriptEditor.htm

Page 41 - CHAPTER 4

135CHAPTER 13BehaviorsBehaviors let users make their HTML pages interactive. They offer web designers an easy way to assign actions to page elements b

Page 42 - The Dreamweaver DOM

Chapter 131363 Dreamweaver calls the windowDimensions() function, if defined, to determine the size of the Parameters dialog box. If windowDimensions(

Page 43

Behaviors 137ReturnsDreamweaver expects a string that contains the function call to be inserted in the user’s document, usually after accepting parame

Page 44 - object that are taken

Chapter 13138Note: Quotation marks within the returned string must be preceded by a backslash (\) to avoid errors that the JavaScript interpreter repo

Page 45

Behaviors 139ExampleThe following instance of canAcceptBehavior() returns a list of preferred events for the behavior if the document has any named im

Page 46 - P tag) is

Chapter 114Importing/exporting sitesYou can programmatically export a Dreamweaver MX site to an XML file, which can then be imported by any Dreamweave

Page 47

Chapter 13140identifyBehaviorArguments()DescriptionIdentifies arguments from a behavior function call as navigation links, dependent files, URLs, Nets

Page 48 - The site object

Behaviors 141A more complex version of identifyBehaviorArguments() is necessary for behavior functions that have a variable number of arguments (such

Page 49

Chapter 13142ExampleThe following instance of inspectBehavior(), taken from Display Status Message.htm, fills in the Message field in the parameters f

Page 50

Behaviors 143A simple behavior exampleTo understand how behaviors work and how you can create one, it’s helpful to look at an example. The Configurati

Page 51 - CHAPTER 5

Chapter 13144 var ieURL = unescape(argArray[2]); document.theForm.nsURL.value = nsURL; document.theForm.ieURL.value = ieURL;}//***************** LO

Page 52 - Insert bar definition tags

145CHAPTER 14Server BehaviorsDreamweaver MX provides users with an interface for adding server behaviors into their documents to perform server-side t

Page 53

Chapter 14146Dreamweaver architectureWhen you use the Server Behavior Builder to create a Dreamweaver-specific extension, Dreamweaver creates several

Page 54 - Insert bar tag attributes

Server Behaviors 147For example, the moveTo_declareParam.edml file contains the following code:<participant> <quickSearch><![CDATA[

Page 55 - Objects 55

Chapter 141483 Click Create.Use the Server Behavior Builder to define your new server behavior.Note: If the Server Behaviors panel is not open and vis

Page 56 - Chapter 556

Server Behaviors 149How the Server Behavior API functions are calledThe Server Behavior API functions are called in the following scenarios:• The find

Page 57 - The Objects API

Introduction 15New document typesExtensible document typesDreamweaver MX lets you create new document types, including types that have file extensions

Page 58

Chapter 14150• When the user clicks the plus (+) button in the Server Behaviors panel, the pop-up menu appears.To determine the content of the menu, D

Page 59

Server Behaviors 151The Server Behavior APIYou can manage server behaviors with the following API functions.analyzeServerBehavior()AvailabilityDreamwe

Page 60 - Chapter 560

Chapter 14152applyServerBehavior()AvailabilityDreamweaver UltraDev 1DescriptionReads values from the form elements in the dialog box and adds the beha

Page 61 - Commands

Server Behaviors 153copyServerBehavior()AvailabilityDreamweaver UltraDev 1DescriptionImplementing copyServerBehavior() is optional. Users can copy ins

Page 62 - The Command API

Chapter 14154displayHelp()DescriptionIf this function is defined, a Help button appears below the OK and Cancel buttons in the dialog box. This functi

Page 63

Server Behaviors 155ArgumentsserverBehaviorserverBehavior is a JavaScript object that represents the behavior. It is the same object that findServerBe

Page 64 - Chapter 664

Chapter 14156ReturnsThe function returns an array that contains all instances of the specified participant (or, in the case of a group file, any insta

Page 65 - function is not defined

Server Behaviors 157dwscripts.applySB()AvailabilityDreamweaver MX (this function replaces applySB() from earlier versions of Dreamweaver)DescriptionIn

Page 66 - Chapter 666

Chapter 14158ExampleThe following example deletes all the participants of the sbObj server behavior, except the participants that are protected by the

Page 67 - Menu Commands

Server Behaviors 159To extract parameter values from <% if (@@rs@@.EOF) Response.Redirect("@@new__url@@"); %>,write a regular expressi

Page 68 - The Menu Commands API

Chapter 116Enhanced database explorationDreamweaver MX enhances database exploration in the following ways.• For ColdFusion, you have the option of ac

Page 69

Chapter 14160Group EDML file tagsThese tags and attributes are valid within the EDML group files.EDML Tag: groupDescriptionContains all specifications

Page 70

Server Behaviors 161ValueThe exact name (without a path) of any server behavior HTML file within a Configuration/ServerBehaviors folder, as shown in t

Page 71

Chapter 14162TypeAttribute.RequiredNo.ValueA unique string that determines which group to apply, as shown in the following example:<group serverBeh

Page 72 - Chapter 772

Server Behaviors 163TypeBlock tag.RequiredYes.Attribute: selectParticipantDescriptionIndicates which participant should be selected and highlighted in

Page 73 - A simple menu command

Chapter 14164TypeAttribute.RequiredYes.ValueThe exact name (without the .edml extension) of any participant file, as shown in the following example:&l

Page 74 - Chapter 774

Server Behaviors 165Participant EDML filesThese tags and attributes are valid within the EDML participant files.EDML Tag: participantDescriptionContai

Page 75 - A simple dynamic menu

Chapter 14166RequiredNo.ValuesearchString is a literal string that exists on the page if the participant exists. It should be as unique as possible, b

Page 76 - Chapter 776

Server Behaviors 167TypeAttribute.RequiredYes.ValuesaboveHTML[+weight], belowHTML[+weight], beforeSelection, replaceSelection, wrapSelection, afterSel

Page 77 - CHAPTER 8

Chapter 14168• lastChildOfNode inserts the text as the last child of a block tag; for example, if you want to insert something at the end of a FORM ta

Page 78 - Chapter 878

Server Behaviors 169EDML Tag: searchPatternsDescriptionProvides information about how to find the participant text in the document and contains a list

Page 79 - The toolbar definition file

17CHAPTER 2Extending Dreamweaver MXMost Dreamweaver extensions are written in HTML and JavaScript. Extensions typically perform the following types of

Page 80 - Attributes

Chapter 14170• comment searches only within the HTML comments <! ... >, as shown in the following example:<searchPatterns whereToSearch="

Page 81 - Container

Server Behaviors 171Note: It is important that the regular expression start and end with a slash (/). Otherwise it is used as a literal string search.

Page 82

Chapter 14172Attribute: limitSearchDescriptionLimits the search to some part of the whereToSearch tag.ParentsearchPatternTypeAttribute.RequiredNo.Valu

Page 83 - Toolbar item tags

Server Behaviors 173• true if the searchPattern does not have to be found to identify the participant.• false (default) if the searchPattern must be f

Page 84

Chapter 14174EDML Tag: updatePatternDescriptionA specific type of regular expression that allows precise updates of participant text. There should be

Page 85

Server Behaviors 175To update the recordset name in all three positions, you need three update patterns for a single parameter, as shown in the follow

Page 86

Chapter 14176Attribute: deleteTypeDescriptionUsed to indicate the type of delete to perform. It has different meanings, depending on whether the parti

Page 87

Server Behaviors 177EDML Tag: searchPatternsDescriptionProvides a way for Dreamweaver to find each specified instance in a document. If multiple searc

Page 88 - Item Tag Attributes

Chapter 14178Attribute: whereToSearchDescriptionSpecifies where to search for the text. This is related to the insert location, so be sure to set both

Page 89

Server Behaviors 179Valuesdynamic data, dynamic image, dynamic source, tabbed region start, tabbed region end, custom• dynamic data indicates that the

Page 90

Chapter 218Extension APIsThe extension APIs provide the framework that you use to add functionality to Dreamweaver. You write the bodies of the functi

Page 91 - To o l b a r s 91

Chapter 14180ValuestagName is a valid tag name. It should be unique to prevent conflicts with known tag types. For example, if you specify <openTag

Page 92 - • Clicks a button

Server Behaviors 181EDML Tag: displayDescriptionAn optional display string that should be inserted in the translation.ParenttranslationTypeBlock tag.R

Page 93 - The Toolbar Command API

Chapter 14182dreamweaver.getExtDataValue()AvailabilityDreamweaver UltraDev 4DescriptionRetrieves the field values from an EDML file for the specified

Page 94

Server Behaviors 183dreamweaver.getExtGroups()AvailabilityDreamweaver UltraDev 4DescriptionRetrieves the name of the group, which is the equivalent to

Page 95

Chapter 14184In this case, the following quickSearch string checks for it:<quickSearch>Response.Redirect</quickSearch>For performance reas

Page 96 - Chapter 896

Server Behaviors 185In the previous example, the telephone number must be specified. However, you can make the telephone number optional, by adding th

Page 97 - To o l b a r s 97

Chapter 14186If you add the server behavior again with a different name, such as "bbb", the document now looks like this:<% //test_p1 nam

Page 98

Server Behaviors 187This server behavior no longer works correctly because only one parameter is named total. To solve this problem, make sure that th

Page 99

Chapter 14188The tag/attribute combination (see the previous example) does not apply to translation because Dreamweaver always translates to straight

Page 100 - A simple toolbar command file

Server Behaviors 189These shortened search patterns are flexible, so the user can add to the code. However, if the server behavior changes the URL, wh

Page 101 - To o l b a r s 101

Extending Dreamweaver MX 19You can use the files that come with the product within the Configuration folder as examples, but these files are generally

Page 102 - Chapter 8102

Chapter 14190Avoiding conflicts with share-in-memory JavaScript filesIf several HTML files reference a particular JavaScript file, Dreamweaver loads t

Page 103 - CHAPTER 9

191CHAPTER 15Data SourcesThe Dreamweaver MX Data Sources API functions let you add data sources, which appear in the plus (+) menu of the Bindings pan

Page 104 - The Reports API

Chapter 151923 Dreamweaver goes through each file in the appropriate server model folder, calling findDynamicSources() in each file. For each value in

Page 105

Data Sources 193The Data Sources APIaddDynamicSource()AvailabilityDreamweaver UltraDev 1DescriptionAdds a dynamic data source. Because there is one im

Page 106

Chapter 15194displayHelp()DescriptionIf this function is defined, a Help button appears below the OK and Cancel buttons in the dialog box. This functi

Page 107 - Tag Libraries and Editors

Data Sources 195DescriptionReturns the top-level nodes from the data source tree that appears in the Dynamic Data or Dynamic Text dialog box or the Bi

Page 108 - Chapter 10108

Chapter 15196generateDynamicSourceBindings() AvailabilityDreamweaver UltraDev 1DescriptionReturns the children of a top-level node.ArgumentssourceName

Page 109 - Tag Libraries and Editors 109

Data Sources 197inspectDynamicDataRef() AvailabilityDreamweaver UltraDev 1DescriptionFrom a dynamic data object, determines the corresponding node in

Page 111 - The Tag Chooser

199CHAPTER 16Server Formats“Data Sources” on page 191 discusses how Dreamweaver MX inserts dynamic data into the user’s document by adding a server ex

Page 112 - Chapter 10112

TrademarksAfterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware, Authorware

Page 113 - Creating a new tag editor

Chapter 220Types of extension APIs in DreamweaverThe following list describes the types of extension APIs that are documented in this guide:Object ext

Page 114 - To register the tag:

Chapter 16200How data formatting works All format files reside in the ServerFormats folder within the Configuration folder. Each server model has its

Page 115 - Creating a tag editor UI

Server Formats 201The Edit Format List plus (+) menuIf you do not want a file in the ServerFormats folder to appear in the Edit Format List plus (+) m

Page 116 - Chapter 10116

Chapter 16202The Data Formatting API applyFormat()AvailabilityDreamweaver UltraDev 1DescriptionAdds a format function declaration to the user’s docume

Page 117 - Tag editor APIs

Server Formats 203ReturnsDreamweaver expects the format object, if the function completes successfully. If an error occurs, the function returns an er

Page 118

Chapter 16204ArgumentsdynamicDataObject, format• dynamicDataObject is a string that contains the dynamic data object.• format is a JavaScript object t

Page 119 - Property Inspectors

205CHAPTER 17ComponentsComponents are modularized groups of functions, or objects, that can be used as building blocks for applications and web pages.

Page 120 - Chapter 11120

Chapter 17206You can set a component type to work at the level of an individual web page, to a set of web pages, or to an entire site. Your JavaScript

Page 121 - The Property inspector API

Components 207Populating the tree controlUse the ComponentRec property to populate a Component panel tree control, so that it appears within the Compo

Page 122 - Arguments

Chapter 17208displayHelp()AvailabilityDreamweaver MXDescriptionDisplays help text for the current tree node item using the Help System using the help

Page 123 - Property Inspectors 123

Components 209Examplefunction getComponentChildren(componentRec){var cs_Children = new Array();if (!componentRec){//read saved entries for java beans.

Page 124 - Chapter 11124

Extending Dreamweaver MX 21Data Translator extensions convert non-HTML code into HTML that appears in the Design view of the Document window. These ex

Page 125 - Floating Panels

Chapter 17210getContextMenuId()AvailabilityDreamweaver MXDescription: An optional function that gets the Context Menu ID for the component type. Every

Page 126 - The Floating panel API

Components 211Examplefunction getContextMenuId(){return "DWConnectionsContext";}<shortcutlist app="ultradev" id="DWConnect

Page 127

Chapter 17212getCodeViewDropCode()AvailabilityDreamweaver MXDescriptionGets the code that is dragged and dropped in Code view from the Component panel

Page 128

Components 213• "Event:SetCurSite" pops up a dialog box to set the current site. • "Event:CreateSite" pops up a dialog box to crea

Page 129

Chapter 17214• toolTipText Optional tool tip text for the tree node item.• isCodeViewDraggable A Boolean value that indicates whether the tree node it

Page 130

Components 215ArgumentsNone.ReturnsDreamweaver expects an array of toolbar buttons in left-to-right order.Examplefunction toolbarControls(){var toolBa

Page 132 - Chapter 12132

217CHAPTER 18Server ModelsServer models are the technologies that run scripts on a server. When users define a new site, they can identify the server

Page 133 - appears

Chapter 18218Note: All Dreamweaver MX-defined server models return a value of 1 so third-party server models can override the file-extension associati

Page 134 - Chapter 12134

Server Models 219getLanguageSignatures()AvailabilityDreamweaver MXDescriptionReturns an object that describes the method and array signatures that the

Page 135 - Behaviors

Chapter 222For all extensions, Dreamweaver executes code in other event handlers (for example, onBlur="alert(’This is a required field.’)")

Page 136 - The Behaviors API

Chapter 18220getServerInfo()AvailabilityDreamweaver MXDescriptionReturns a JavaScript object, which can be accessed from within the JavaScript code. Y

Page 137

Server Models 221ArgumentsNone.ReturnsDreamweaver expects an array of strings that represent the supported scripting languages. getServerModelExtDataN

Page 138 - Chapter 13138

Chapter 18222getServerModelDisplayName()AvailabilityDreamweaver MXDescriptionReturns the name that should appear in the user interface for this server

Page 139

Server Models 223getVersionArray() AvailabilityDreamweaver UltraDev 1, deprecated in Dreamweaver MXDescriptionProvides a mapping of server technologie

Page 141 - Behaviors 141

225CHAPTER 19Data TranslatorsData translators translate specialized markup—server-side includes, conditional JavaScript statements, or other code such

Page 142

Chapter 19226• Invokes a command, behavior, server behavior, Property inspector, or other extension that sets the innerHTML or outerHTML property of a

Page 143 - Behaviors 143

Data Translators 2277 runDefault specifies when this translator executes. The following table lists the possible values:If you set runDefault to "

Page 144 - Chapter 13144

Chapter 19228translateMarkup()DescriptionPerforms the translation.ArgumentsdocName, siteRoot, docContent• docName is a string that contains the file:/

Page 145 - Server Behaviors

Data Translators 229ReturnsA string that contains the translated document or an empty string if nothing is translated.ExampleThe following instance of

Page 146 - Dreamweaver architecture

Extending Dreamweaver MX 23Document type definition fileThe central component of extensible document types is the document type definition file. There

Page 147 - Server Behaviors 147

Chapter 19230The mmTranslatedValue attribute must be unique within the tag. If it is likely that your translator needs to translate more than one attr

Page 148 - Define the code to insert

Data Translators 231The poco.xml file that contains this tagspec is stored in the Configuration/ThirdPartyTags folder, along with the icon for Poco ta

Page 149 - Server Behaviors 149

Chapter 19232 back3FromStart = start-3; end = outStr.indexOf(’ #>’,start); equalSign = outStr.indexOf(’="<# if’,back3FromStart); at

Page 150 - Chapter 14150

Data Translators 233 } // Return the translated string. return outStr}function getTranslatorInfo(){ returnArray = new Array(7); returnArray[0] = &q

Page 151 - The Server Behavior API

Chapter 19234The fields in the Property inspector are still editable; users can enter values for attributes that might be controlled by server markup,

Page 152

Data Translators 235The following example shows the locked portion of code that might be generated from the translation of the server-side include <

Page 153

Chapter 19236 returnArray[0] = "DREAMWEAVER_TEAM"// The translatorClass returnArray[1] = "Kent Tags"// The title returnArray[

Page 154

Data Translators 237/*************************************************************** The replaceKentTag() function assembles the HTML that will ** re

Page 155

Chapter 19238 // Now determine which photo to show based on whether it’s a workday or a // weekend; what time it is; and, if it’s a time and day

Page 156

Data Translators 239Creating Property inspectors for locked contentAfter you’ve created a translator, you need to create a Property inspector for the

Page 157

Chapter 224If you need to create a new document type, you can either add your entry to the document definition file that Macromedia provides (MMDocume

Page 158 - Editing EDML files

Chapter 19240To populate the fields in the Property inspector for the translated tag, you must parse the value of the orig attribute. For example, if

Page 159 - Server Behaviors 159

Data Translators 241The Property inspector for translated server-side includes (Configuration/Inspectors/ssi_translated.js) demonstrates this techniqu

Page 160 - Group EDML file tags

Chapter 192423 At the end of the translateMarkup() function, comment out the return whateverTheReturnValueIs line, and replace it with dreamweaver.get

Page 161

243CHAPTER 20JavaScript Debugger ModulesA JavaScript Debugger module is an extensibility module that inserts special code into a document so the code

Page 162

Chapter 202444 When Dreamweaver finds a script tag or event handler, it calls the startBlock() function of the module and passes in the name of the fi

Page 163

JavaScript Debugger Modules 245The JavaScript Debugger module API The JavaScript Debugger module API lets you customize the way you create the debug v

Page 164

Chapter 20246getFunctionStartInstrument()AvailabilityDreamweaver 4DescriptionCalled before the first statement in a function declaration. The getStepI

Page 165 - Participant EDML files

JavaScript Debugger Modules 247getIncludedFileList()AvailabilityDreamweaver 4DescriptionCalled to get a list of files that are referenced by the code

Page 166

Chapter 20248getStepInstrument()AvailabilityDreamweaver 4DescriptionCalled for each statement that is parsed inside a block. A call is always made to

Page 167 - Required

JavaScript Debugger Modules 249reportWarning()AvailabilityDreamweaver 4DescriptionCalled when a warning is detected in the file.ArgumentsfileURL, file

Page 168

Extending Dreamweaver MX 25The following table describes the tags and attributes that you can use within a document type definition file. Element Typ

Page 169

Chapter 20250

Page 170

251CHAPTER 21C-Level ExtensibilityThe C-level extensibility mechanism lets you implement Macromedia Dreamweaver MX extensibility files using a combina

Page 171

Chapter 21252The readContentsOfFile() function accepts a list of arguments from the user, unpacks the argument that contains the filename, reads the c

Page 172

C-Level Extensibility 253Your library must include exactly one instance of the following macro:/* MM_STATE is a macro that expands to some definitions

Page 173 - Server Behaviors 173

Chapter 21254typedef enum { JS_FALSE = 0, JS_TRUE = 1 } JSBoolDescriptionA simple data type that stores a Boolean value.The C-level APIThe C-level ext

Page 174

C-Level Extensibility 255char *JS_ValueToString()DescriptionExtracts a function argument from a jsval, converts it to a string, if possible, and passe

Page 175

Chapter 21256JSBool JS_ValueToBoolean()DescriptionExtracts a function argument from a jsval, converts it to a Boolean value (if possible), and passes

Page 176

C-Level Extensibility 257ReturnsA Boolean value that indicates success (JS_TRUE) or failure (JS_FALSE).JSBool JS_DoubleToValue()DescriptionStores a fl

Page 177

Chapter 21258char *JS_ObjectType()DescriptionGiven an object reference, JS_ObjectType() returns the class name of the object. For example, if the obje

Page 178

C-Level Extensibility 259JSBool JS_GetElement()DescriptionReads a single element of an array object.ArgumentsJSContext *cx, JSObject *obj, unsigned in

Page 179

Chapter 226Note: When the user saves a new document, Dreamweaver MX examines the list of extensions for the current platform that are associated with

Page 180

Chapter 21260• sz is the size of the string, in bytes. If sz is 0, the length of the null-terminated string is computed automatically. • rval is a poi

Page 181

C-Level Extensibility 261Dreamweaver MX creates the user configuration folder in a location where the user has full read and write access. The followi

Page 182

Chapter 21262For example, if you used the trash can in the Snippets panel to delete a Snippets folder called javascript and a file called onepixelbord

Page 183 - Server behavior techniques

C-Level Extensibility 263JSBool MM_ConfigFileExists()AvailabilityDreamweaver MXDescriptionChecks whether the specified file exists. If it is a file in

Page 184 - Chapter 14184

Chapter 21264If you open the file in "write" mode, any existing data in the file is truncated prior to writing new data. If you open the fil

Page 185 - Server Behaviors 185

C-Level Extensibility 265Examplechar dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver MX/Configuration/Extensions.txt";unsigned l

Page 186 - Chapter 14186

Chapter 21266JSBool MM_CreateConfigFolder()AvailabilityDreamweaver MXDescriptionCreates a folder in the specified location.If fileURL specifies a fold

Page 187 - • File transfer dependency

C-Level Extensibility 267If fileURL is not in the Dreamweaver MX Configuration folder, the function deletes the specified file.Argumentschar *fileURL

Page 188 - Chapter 14188

Chapter 212684 Add the line alert(Sample.computeSum(2,2)); to the objectTag() function so that it appears as shown in the following example:function o

Page 189 - Server Behaviors 189

Part IIIUtility APIsUnderstand the Dreamweaver utility functions that you can use to acccess local and web-based files, work with Fireworks and Flash

Page 190 - //SHARE-IN-MEMORY=true

Extending Dreamweaver MX 27When Dreamweaver MX launches, it reads all document type definition files and builds a list of valid document types. Dreamw

Page 192 - Chapter 15192

271CHAPTER 22The File I/O APIMacromedia Dreamweaver MX includes a C shared library called DWfile that gives authors ofobjects, commands, behaviors, da

Page 193 - The Data Sources API

Chapter 22272Returnstrue if the copy succeeds; false otherwise.ExampleThe following code copies a file called myconfig.cfg to myconfig_backup.cfg.var

Page 194

The File I/O API 273ExampleThe following code checks for a file called mydata.txt and displays an alert box that tells the user whether the file exist

Page 195 - DataSourceClass.js

Chapter 22274DWfile.getModificationDate()AvailabilityDreamweaver 2DescriptionGets the time when the file was last modified.ArgumentsfileURLThe argumen

Page 196 - Availability

The File I/O API 275ReturnsA string that contains a hexadecimal number that represents the number of time units that have elapsed since some base time

Page 197 - Data Sources 197

Chapter 22276DWfile.getSize()AvailabilityDreamweaver MXDescriptionGets the size of a specified file.ArgumentsfileURLThe argument, which is expressed a

Page 198 - Chapter 15198

The File I/O API 277DWfile.read()AvailabilityDreamweaver 2DescriptionReads the contents of the specified file into a string.ArgumentsfileURLThe argume

Page 199 - Server Formats

Chapter 22278DWfile.setAttributes()AvailabilityDreamweaver MXDescriptionSets the system-level attributes of a particular file.ArgumentsfileURL, strAtt

Page 200 - How data formatting works

The File I/O API 279Returnstrue if the string is successfully written to the file, false otherwise.ExampleThe following code attempts to write the str

Page 201 - Server Formats 201

Chapter 228Document extensionsAfter creating a new document type, extension developers need to update the appropriate Extensions.txt file. If the user

Page 203

281CHAPTER 23The HTTP APIExtensions are not limited to working within the local file system. Macromedia Dreamweaver MX provides a mechanism to get inf

Page 204

Chapter 23282MMHttp.clearTemp()DescriptionDeletes all the files in the Configuration/Temp folder, which is located inside the Dreamweaver application

Page 205 - CHAPTER 17

The HTTP API 283ReturnsAn object that represents the reply from the server. The data property of this object is a string that contains the location wh

Page 206 - Chapter 17206

Chapter 23284MMHttp.getFileCallback()DescriptionGets the file at the specified URL, saves it in the Configuration/Temp folder inside the Dreamweaver a

Page 207 - Component panel API functions

The HTTP API 285ExampleThe following code gets the contents of a file on a web server and puts it in a new, untitled Dreamweaver document:var httpRepl

Page 208

Chapter 23286MMHttp.postText()DescriptionUses an HTTP post request to pass the specified data to the specified URL. Typically the data that is associa

Page 209 - Components 209

287CHAPTER 24The Design Notes APIMacromedia Dreamweaver, Fireworks, and Flash MX give web designers and developers a way to store and retrieve extra i

Page 210 - Description:

Chapter 24288The Design Notes JavaScript APIAll functions in the Design Notes JavaScript API are methods of the MMNotes object. Optional arguments are

Page 211 - Components 211

The Design Notes API 289ReturnsA string that contains the value of the key.ExampleSee “MMNotes.getKeys()” on page 289.MMNotes.getKeyCount()Description

Page 212

Extending Dreamweaver MX 29To provide localized strings, perform the following steps:1 Place the following statement at the top of the document type d

Page 213

Chapter 24290MMNotes.getSiteRootForFile()DescriptionDetermines the site root for the specified Design Notes file.ArgumentsfileURLThe argument is the p

Page 214 - Chapter 17214

The Design Notes API 291The argument is the path to a local file, which is expressed as a file:// URL.ReturnsA string that contains the local drive pa

Page 215 - Components 215

Chapter 24292MMNotes.set()DescriptionCreates or updates one key/value pair in a Design Notes file.ArgumentsfileHandle, keyName, valueString• The first

Page 216 - Chapter 17216

The Design Notes API 293BOOL FilePathToLocalURL()DescriptionConverts the specified local drive path to a file:// URL.Argumentsconst char* drivePath, c

Page 217 - Server Models

Chapter 24294int GetNoteLength()DescriptionGets the length of the value associated with the specified key.ArgumentsFileHandle noteHandle, const char k

Page 218

The Design Notes API 295ExampleThe following code prints the key names and values of all the keys in the Design Notes file that are associated with we

Page 219

Chapter 24296BOOL GetVersionName()DescriptionGets the version name of the MMNotes shared library, which indicates the application that implemented it.

Page 220

The Design Notes API 297FileHandle OpenNotesFile()DescriptionOpens the Design Notes file that is associated with the specified file or creates one if

Page 221

Chapter 24298BOOL SetNote()DescriptionCreates or updates one key/value pair in a Design Notes file.ArgumentsFileHandle noteHandle, const char keyName[

Page 222

299CHAPTER 25The Fireworks Integration APIFWLaunch is a C shared library that gives authors of objects, commands, behaviors, and Property inspectors t

Page 223 - • ADODB version 2.1

3CONTENTSPart IOverviewCHAPTER 1Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 224 - Chapter 18224

Chapter 230Opening a document in DreamweaverWhen a user opens a file, Dreamweaver MX follows a series of steps to identify the document type based on

Page 225 - Data Translators

Chapter 25300FWLaunch.execJsInFireworks()AvailabilityDreamweaver 3, Fireworks 3DescriptionPasses the specified string of JavaScript to Fireworks for e

Page 226 - Chapter 19226

The Firework s Integration API 301• Error launching Fireworks process; the function does not launch a valid version of Fireworks (3 or later).• User c

Page 227 - Data Translators 227

Chapter 25302FWLaunch.optimizeInFireworks()AvailabilityDreamweaver 2, Fireworks 2DescriptionLaunches a Fireworks optimization session for the specifie

Page 228

The Firework s Integration API 303ExampleThe following code checks whether Fireworks 3 is installed:if (FWLaunch.validateFireworks(3.0)){alert( "

Page 229 - Data Translators 229

Chapter 25304A simple Fireworks integration exampleThe following command asks Fireworks to prompt the user for his or her name and returns the name to

Page 230 - Chapter 19230

The Firework s Integration API 305alert("cancel clicked");} else {// We’re still going, ask Fireworks how it’s doingif (gProgressTrackerCook

Page 232 - Chapter 19232

307CHAPTER 26The Flash Objects APIThe Flash Objects API lets extension developers build objects that create simple Macromedia Flash content. This API

Page 233 - Data Translators 233

Chapter 26308• {pngFileName} is the output filename of a .png filename, which is expressed as a file:// URL. Optional.• {jpgFileName} is the output fi

Page 234 - Chapter 19234

The Flash Objects API 309SWFFile.getNaturalSize() DescriptionReturns the natural size of any Flash movie.ArgumentsfileNamefileName is a path to the Fl

Page 235 - Data Translators 235

31CHAPTER 3User Interfaces for ExtensionsMost extensions are built to receive information from the user through a user interface (UI). If you plan to

Page 236 - Chapter 19236

Chapter 26310ExampleCalling var params = SWFFile.readFile("file:///MyMac/test.swf") returns the following values in the parameters array:&qu

Page 237 - Data Translators 237

311CHAPTER 27The Database APIFunctions in the Database API let you manage database connections and access information that is stored in databases. In

Page 238 - Chapter 19238

Chapter 27312Note: This example uses the MMDB.getColumnList() function.function getDynamicBindings(elementNode){var ss = findSSrec(elementNode, LABEL_

Page 239 - Data Translators 239

The Database API 313Example//deletes a connectionfunction clickedDelete(){var selectedObj = dw.serverComponents.getSelectedNode();if (selectedObj &

Page 240 - Chapter 19240

Chapter 27314Note: These properties are the standard ones implemented by Dreamweaver MX. Developers can define their own connection types and add new

Page 241 - Data Translators 241

The Database API 315MMDB.getConnectionName()AvailabilityDreamweaver UltraDev 1DescriptionGets the connection name that corresponds to the specified co

Page 242 - Chapter 19242

Chapter 27316ReturnsA connection string that corresponds to the named connection.ExampleThe code var connectionString = MMDB.getConnectionString (&quo

Page 243 - JavaScript Debugger Modules

The Database API 317In summary, Dreamweaver UltraDev 4 developers need to add a new entry to the XML, and Dreamweaver MX developers need to implement

Page 244 - Chapter 20244

Chapter 27318MMDB.getRdsPassword()AvailabilityDreamweaver UltraDev 4DescriptionGets the Remote Development Services (RDS) password.ArgumentsNone.Retur

Page 245

The Database API 319MMDB.getRuntimeConnectionType()AvailabilityDreamweaver UltraDev 1DescriptionReturns the runtime connection type of the specified c

Page 246

Chapter 332Consider the following basic guidelines as you design an extension UI:• If you want a name for your extension, place the name in the Title

Page 247 - BODY tag

Chapter 27320MMDB.hasConnectionWithName()AvailabilityDreamweaver UltraDev 4DescriptionDetermines whether a connection of a given name exists.Arguments

Page 248 - , bisInFuncton

The Database API 321MMDB.popupConnection()AvailabilityDreamweaver MXDescriptionInvokes a connection dialog box. This function has the following three

Page 249

Chapter 27322MMDB.setRdsUserName()AvailabilityDreamweaver UltraDev 4DescriptionSets the RDS user name.Argumentsusername is the name of a valid RDS use

Page 250 - Chapter 20250

The Database API 323MMDB.showOdbcDialog()AvailabilityDreamweaver UltraDev 4 (Windows only)DescriptionDisplays the System ODBC Administration dialog bo

Page 251 - C-Level Extensibility

Chapter 27324MMDB.testConnection()AvailabilityDreamweaver UltraDev 4DescriptionTests connection settings. Displays a modal dialog box that describes t

Page 252 - • A pointer to the function

The Database API 325MMDB.getColumnAndTypeList()AvailabilityDreamweaver UltraDev 1DescriptionGets a list of columns and their types from an executed SQ

Page 253 - Data Types

Chapter 27326ExampleThe code var columnArray = MMDB.getColumnList("EmpDB","Select * from Employees") returns the following array o

Page 254

The Database API 327MMDB.getColumnsOfTable()AvailabilityDreamweaver UltraDev 1DescriptionGets a list of all the columns in the specified table.Argumen

Page 255

Chapter 27328MMDB.getProcedures()AvailabilityDreamweaver MXDescriptionReturns an array of procedure objects that are associated with a named connectio

Page 256

The Database API 329MMDB.getSPColumnList()AvailabilityDreamweaver UltraDev 1DescriptionGets a list of result set columns that are generated by a call

Page 257

User Interfaces for Extensions 33In addition to letting you make extension UIs more closely match the built-in dialog boxes and panels, the new DOCTYP

Page 258

Chapter 27330• paramNameArray is an array that contains a list of parameter names. You can use the MMDB.getSPParamsAsString() function to get the para

Page 259

The Database API 331ReturnsAn array of parameter objects, each specifying the following set of properties:Examplevar paramNameObjs = MMDB.getSPParamet

Page 260 - Chapter 21260

Chapter 27332MMDB.getTables()AvailabilityDreamweaver UltraDev 1DescriptionGets a list of all the tables that are defined for the specified database. E

Page 261 - C-Level Extensibility 261

The Database API 333ExampleThe following example returns the views for a given connection value, CONN_LIST.getValue():var viewObjects = MMDB.getViews(

Page 262

Chapter 27334MMDB.showSPResultset()AvailabilityDreamweaver UltraDev 1DescriptionDisplays a dialog box that has the results of executing the specified

Page 263 - or "append" mode

The Database API 335• paramNameArray is an array that contains a list of parameter names. You can use the MMDB.getSPParamsAsString() function to get t

Page 264

Chapter 27336

Page 265

337CHAPTER 28The Database Connectivity APIAs a developer, you can create a new connection types and corresponding dialog boxes for new or existing ser

Page 266

Chapter 28338Note: At runtime, Dreamweaver MX dynamically builds the list of connection types that are available to the user from the collection of di

Page 267

The Database Connectivity API 339The applyConnection() function returns an HTML source within an include file. You can see examples of the HTML source

Page 268 - Chapter 21268

Chapter 334The following example illustrates the settings for an editable select list: <select name="travelOptions" style="width:250

Page 269 - Utility APIs

Chapter 28340ReturnsA connection object that provides values for a particular combination of the properties that are listed in the following table. Th

Page 270

The Database Connectivity API 341inspectConnection()AvailabilityDreamweaver UltraDev 4DescriptionDreamweaver calls this function, when the user edits

Page 271 - The File I/O API

Chapter 28342ASP JavaScriptThe ASP and JavaScript include file should be named MyConnection1.asp, where MyConnection1 is the name of the connection. T

Page 272

The Database Connectivity API 343The server behavior file includes this connection by using the relative file include statement, as shown in the follo

Page 273 - • S is system file or folder

Chapter 28344Note: If you change the format of your include file or define an include file for a new server model, you need to map the connection para

Page 274

345CHAPTER 29The JavaBeans APIThis chapter explains the APIs for JavaBeans, the MMJB*() functions are JavaScript hooks that invoke Java introspection

Page 275

Chapter 29346MMJB.getEvents()AvailabilityDreamweaver UltraDev 4DescriptionIntrospects the JavaBeans class and returns its events. ArgumentspackageName

Page 276

The JavaBeans API 347MMJB.getClassesFromPackage()AvailabilityDreamweaver UltraDev 4DescriptionReads all the JavaBeans classes from the package.Argumen

Page 277

Chapter 29348

Page 278 - Visible (overrides H)

349CHAPTER 30The Source Control Integration APIThe Source Control Integration API lets you write shared libraries to extend the Macromedia Dreamweaver

Page 279 - The File I/O API 279

User Interfaces for Extensions 35The following example creates a command that contains an editable select list using common JavaScript functions:<h

Page 280 - Chapter 22280

Chapter 30350Check In/Check Out is treated differently than the Design Notes feature; if the source control system supports it, the user cannot overri

Page 281 - The HTTP API

The Source Control Integration API 351Argumentsvoid **connectionData, const char siteName[64]• connectionData is a handle to the data that the agent w

Page 282

Chapter 30352bool SCS_GetRootFolder()DescriptionReturns the name of the root folder.Argumentsvoid *connectionData, char remotePath[], const int folder

Page 283 - The HTTP API 283

The Source Control Integration API 353• itemList is a preallocated list of itemInfo structures: • numItems is the number of items that are allocated f

Page 284

Chapter 30354• connectionData is a pointer to the agent’s data that passed into Dreamweaver during the Connect() call.• localPathList is the list of l

Page 285

The Source Control Integration API 355To find out if an invocation of this function is a move or a rename, check the parent paths of the two input val

Page 286

Chapter 30356bool SCS_SiteDeleted()DescriptionNotifies the DLL that the site has been deleted or that the site is no longer tied to this source contro

Page 287 - The Design Notes API

The Source Control Integration API 357Argumentschar menuItemList[][32], scFunction functionList[], scFunction enablerList[], const int numNewFeatures•

Page 288

Chapter 30358Argumentsvoid *connectionData, const char *localPathList[], const char *remotePathList[], bool successList[], const int numItems• connect

Page 289

The Source Control Integration API 359Argumentsvoid *connectionData, const char *remotePathList[], const char *localPathList[], bool successList[], co

Page 290

Chapter 336Database controlsUsing Dreamweaver, you can extend the HTML <select> tag to create a database tree control. You can also add a variab

Page 291

Chapter 30360• emailAddressList is a list of strings that corresponds to the users’ e-mail addresses. Each e-mail address string cannot exceed a maxim

Page 292 - The Design Notes C API

The Source Control Integration API 361• connectionData is a pointer to the agent’s data that passed into Dreamweaver during the Connect() call.• remot

Page 293

Chapter 30362• showColumnList is a list of Boolean values that correspond to the Design Note keys, which indicate whether Dreamweaver can display the

Page 294

The Source Control Integration API 363• connectionData is a pointer to the agent’s data that passed into Dreamweaver during the Connect() call.• remot

Page 295 - The Design Notes API 295

Chapter 30364bool SCS_canCheckout()DescriptionReturns whether the Checkout menu item should be enabled.Argumentsvoid *connectionData, const char *remo

Page 296

The Source Control Integration API 365• remotePathList is a mirrored list of remote file or folder path names.• numItems is the number of items in eac

Page 297

Chapter 30366bool SCS_canDelete()DescriptionReturns whether the Delete menu item should be enabled.Argumentsvoid *connectionData, const char *remotePa

Page 298 - OpenNotesFile() returns

The Source Control Integration API 367ExampleTo get a group of files, Dreamweaver makes calls to the DLL in the following order:SCS_BeforeGet(connecti

Page 299 - The Fireworks Integration API

Chapter 30368bool SCS_AfterPut()DescriptionDreamweaver calls this function after putting or checking in one or more files. This function lets the DLL

Page 300

Part IVJavaScript APIUse any of the more than 600 core JavaScript functions available in Dreamweaver, which encapsulate the kinds of tasks users perfo

Page 301

User Interfaces for Extensions 37Adding a variable grid controlThe variable grid control has the following attributes:The following example adds a sim

Page 303

371CHAPTER 31The Dreamweaver JavaScript APIThe Macromedia Dreamweaver MX JavaScript API provides an extensive set of tools that are useful to extensio

Page 304 - Chapter 25304

Chapter 31372Functions that refer to Dreamweaver are methods of the dreamweaver object. For example, dreamweaver.closeDocument() is a function of the

Page 305

The Dreamweaver JavaScript API 373dreamweaver.assetPalette.addToFavoritesFromSiteAssets()AvailabilityDreamweaver 4DescriptionAdds elements that are se

Page 306 - Chapter 25306

Chapter 31374dreamweaver.assetPalette.edit()AvailabilityDreamweaver 4DescriptionEdits selected elements with primary external editor or Custom Edit co

Page 307 - The Flash Objects API

The Dreamweaver JavaScript API 375Note: If nothing is selected in the Assets panel, this function returns an array of one empty string.ExampleIf URLs

Page 308 - Chapter 26308

Chapter 31376dreamweaver.assetPalette.locateInSite()AvailabilityDreamweaver 4DescriptionSelects files that are associated with the selected elements i

Page 309

The Dreamweaver JavaScript API 377dreamweaver.assetPalette.recreateLibraryFromDocument()AvailabilityDreamweaver 4DescriptionReplaces the deprecated li

Page 310 - Chapter 26310

Chapter 31378dreamweaver.assetPalette.renameNickname()AvailabilityDreamweaver 4DescriptionEdits the folder name or the file’s nickname by displaying a

Page 311 - The Database API

The Dreamweaver JavaScript API 379dreamweaver.referencePalette.getFontSize() Availability Dreamweaver 4 Description Returns the current font size of t

Page 312 - Database connection functions

Chapter 338Adding tree controlsTree controls display data in a hierarchical format and let users expand and collapse nodes in the tree. The mm:treecon

Page 313

Chapter 31380Behavior functions Behavior functions let you add behaviors to and remove them from an object, find out which behaviors are attached to a

Page 314

The Dreamweaver JavaScript API 381ReturnsA string that represents the function call (for example, "MM_swapImage(’document.Image1’,’document.Image

Page 315

Chapter 31382ArgumentsNone.ReturnsA DOM object or null. This function returns null under the following circumstances:• When the current script is not

Page 316 - JDBC drivers

The Dreamweaver JavaScript API 383ExampleIf you write an action that can be applied only to a hypertext link (A HREF), you can use getBehaviorTag() as

Page 317

Chapter 31384dreamweaver.behaviorInspector.getBehaviorAt()AvailabilityDreamweaver 3DescriptionGets the event/action pair at the specified position in

Page 318

The Dreamweaver JavaScript API 385ArgumentsNone.ReturnsAn integer that represents the position of the selected action in the Behaviors panel, or –1 if

Page 319

Chapter 31386ExampleAssuming the Behaviors panel setup shown in the following example, calling dreamweaver.behaviorInspector.moveBehaviorDown(2) swaps

Page 320

The Dreamweaver JavaScript API 387dreamweaver.behaviorInspector.setSelectedBehavior()AvailabilityDreamweaver 3DescriptionSelects the action at the spe

Page 321

Chapter 31388Clipboard functionsClipboard functions are related to cutting, copying, and pasting. On the Macintosh, some Clipboard functions can also

Page 322

The Dreamweaver JavaScript API 389ReturnsNothing.dom.clipPaste()AvailabilityDreamweaver 3DescriptionPastes the contents of the Clipboard into the curr

Page 323

User Interfaces for Extensions 39MM:TREECOLUMN tags have the following attributes:For readability, TREECOLUMN tags should follow immediately after the

Page 324 - Chapter 27324

Chapter 31390ArgumentsNone.ReturnsNothing.Enabler“dom.canClipPasteText()” on page 410ExampleIf the Clipboard contains <code>return true;</cod

Page 325

The Dreamweaver JavaScript API 391dreamweaver.clipCut()AvailabilityDreamweaver 3DescriptionRemoves the selection from the active Document window, dial

Page 326

Chapter 31392ReturnsA string that contains the contents of the Clipboard, if the Clipboard contains text (which can be HTML); otherwise, nothing.Examp

Page 327

The Dreamweaver JavaScript API 393The following example shows the format of the CodeHints.xml file.<codehints><menugroup name="HTML Enti

Page 328

Chapter 31394<menugroup>DescriptionEach menugroup tag corresponds to a type of menu. You can see the menu types that Dreamweaver MX defines by s

Page 329

The Dreamweaver JavaScript API 395Example<description><![CDATA[ To add or remove tags and attributes, use the <a href="javascript:dw.

Page 330

Chapter 31396Attributeslabel value {icon} {texticon}label is the string that Dreamweaver displays in the pop-up menu. value is the string that Dreamwe

Page 331

The Dreamweaver JavaScript API 397pattern specifies the name of the function and its argument list. For methods, the pattern attribute describes the n

Page 332

Chapter 31398labelArray is an array of strings. Each string is the text for a single menu item in the pop-up menu. valueArray is an array of strings,

Page 333

The Dreamweaver JavaScript API 399casesensitive specifies whether the pattern is case-sensitive. The possible values for casesensitive are the Boolean

Page 334

Contents4Part IIExtension APIsCHAPTER 5Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 335 - The Database API 335

Chapter 340Adding nodes To add a node to an existing tree control programmatically, set the innerHTML property of the mm:treecontrol tag or one of the

Page 336 - Chapter 27336

Chapter 31400dw.codeHints.showCodeHints()AvailabilityDreamweaver MXDescriptionDreamweaver calls this function when the user invokes the Edit > Show

Page 337 - The Database Connectivity API

The Dreamweaver JavaScript API 401ArgumentscommandFile, {commandArg1}, {commandArg2},...{commandArgN}• commandFile is a filename in the Configuration/

Page 338 - The Connection API

Chapter 31402Conversion functionsConversion functions convert tables to layers, layers to tables, and Cascading Style Sheets (CSS) styles to HTML mark

Page 339 - Argument

The Dreamweaver JavaScript API 403CSS Styles functionsCSS styles functions handle the application, removal, creation, and deletion of CSS styles. Meth

Page 340 - Chapter 28340

Chapter 31404ArgumentselementNode, {classOrID}• elementNode is an element node in the DOM. If elementNode is specified as an empty string (" &quo

Page 341 - The generated include file

The Dreamweaver JavaScript API 405dreamweaver.cssStylePalette.deleteSelectedStyle()AvailabilityDreamweaver 3DescriptionDeletes the style that is curre

Page 342 - ColdFusion

Chapter 31406dreamweaver.cssStylePalette.editStyleSheet()AvailabilityDreamweaver 3DescriptionOpens the Edit Style Sheet dialog box.ArgumentsNone.Retur

Page 343

The Dreamweaver JavaScript API 407ArgumentsNone.ReturnsThe object to which the style should be applied, or NULL if the target is the current selection

Page 344 - Chapter 28344

Chapter 31408dreamweaver.cssStylePalette.newStyle()AvailabilityDreamweaver 3DescriptionOpens the New Style dialog box.ArgumentsNone.ReturnsNothing.Dat

Page 345 - The JavaBeans API

The Dreamweaver JavaScript API 409• The dataSource property is the simple name of the file in which the findDynamicSources() function is defined. For

Page 346

41CHAPTER 4The Dreamweaver Document Object ModelIn Dreamweaver, the Document Object Model (DOM) is a critically important tool for extension builders.

Page 347 - .jar or .zip Java archive

Chapter 31410dom.canArrange()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Bring to Front or Move to Back operation.Arg

Page 348 - Chapter 29348

The Dreamweaver JavaScript API 411ReturnsA Boolean value that indicates whether the clipboard contains any content that can be pasted into Dreamweaver

Page 349 - CHAPTER 30

Chapter 31412dom.canDecreaseRowspan()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Decrease Rowspan operation.Arguments

Page 350 - Chapter 30350

The Dreamweaver JavaScript API 413ArgumentsNone.ReturnsA Boolean value that indicates whether the current document is a frameset or within a frameset.

Page 351

Chapter 31414dom.canInsertTableRows()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform an Insert Row(s) operation.ArgumentsNo

Page 352

The Dreamweaver JavaScript API 415ArgumentsNone.ReturnsA Boolean value that indicates whether the selection is an adjacent grouping of table cells. do

Page 353

Chapter 31416dom.canSelectTable()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Select Table operation.ArgumentsNone.Ret

Page 354

The Dreamweaver JavaScript API 417ArgumentsNone.ReturnsA Boolean value that indicates whether the selection is within a frame.dom.canSplitTableCell()A

Page 355

Chapter 31418dom.hasTracingImage()AvailabilityDreamweaver 3DescriptionChecks whether the document has a tracing image.ArgumentsNone.ReturnsA Boolean v

Page 356

The Dreamweaver JavaScript API 419ArgumentsNone.ReturnsA Boolean value that indicates whether there is any content selected that can be copied to the

Page 357

Chapter 442For example, to refer to the first image in the active document you can write dw.getDocumentDOM().images[0]. You can also store the documen

Page 358

Chapter 31420dreamweaver.canExportCSS()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform an Export CSS Styles operation.Argum

Page 359

The Dreamweaver JavaScript API 421DescriptionChecks whether Dreamweaver can perform an Open in Frame operation.ArgumentsNone.ReturnsA Boolean value th

Page 360

Chapter 31422dreamweaver.canRevertDocument()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Revert (to the last-saved ver

Page 361

The Dreamweaver JavaScript API 423dreamweaver.canSaveDocumentAsTemplate()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a

Page 362

Chapter 31424dreamweaver.canSelectAll()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Select All operation.ArgumentsNone

Page 363

The Dreamweaver JavaScript API 425ReturnsA Boolean value: true if the selected style has a class selector; false otherwise.dreamweaver.cssStylePalette

Page 364

Chapter 31426ArgumentsNone.ReturnsA Boolean value: true if the selection is a stylesheet node or a style definition within a stylesheet node and the s

Page 365

The Dreamweaver JavaScript API 427dreamweaver.resultsPalette.canClipCopy()AvailabilityDreamweaver MXDescriptionChecks whether the current Results wind

Page 366

Chapter 31428Return ValueA Boolean value: true if the contents can be displayed; false otherwise.dreamweaver.resultsPalette.canOpenInEditor()Availabil

Page 367

The Dreamweaver JavaScript API 429DescriptionChecks whether you can edit the currently selected item and returns true or false so that you can enable

Page 368 - *connectionData

The Dreamweaver Document Object Model 43all tags/elements nodeType •parentNode •childNodes •tagName •attributes by nameinnerHTMLouterHTMLgetAttribute(

Page 369 - JavaScript API

Chapter 31430dreamweaver.tagInspector.tagAfterEnabled()AvailabilityDreamweaver MXDescriptionChecks whether the dreamweaver.treeViewPalette.tagAfter()

Page 370

The Dreamweaver JavaScript API 431ReturnsA Boolean value that indicates whether the Timelines panel has any animation bars or behaviors.dreamweaver.ti

Page 371 - CHAPTER 31

Chapter 31432dreamweaver.timelineInspector.canRemoveFrame()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Remove Frame o

Page 372 - Assets panel functions

The Dreamweaver JavaScript API 433ArgumentsbrowserNamebrowserName is the name of a browser as defined in the Preview in Browser preferences. If omitte

Page 373

Chapter 31434ReturnsA Boolean value that indicates whether all the following conditions are true:• A remote site has been defined.• If a Document wind

Page 374

The Dreamweaver JavaScript API 435site.canConnect()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can connect to the remote site.Argum

Page 375

Chapter 31436site.canLocateInSite()AvailabilityDreamweaver 3DescriptionDetermines whether Dreamweaver can perform a Locate in Local Site or Locate in

Page 376

The Dreamweaver JavaScript API 437ReturnsA Boolean value that indicates whether any files are visible in the selected pane of the Site panel.site.canO

Page 377

Chapter 31438site.canRefresh()AvailabilityDreamweaver 3DescriptionChecks whether Dreamweaver can perform a Refresh [Local | Remote] operation.Argument

Page 378

The Dreamweaver JavaScript API 439ArgumentsNone.ReturnsA Boolean value: true if the site allows Check In/Check Out; false otherwise.site.canSelectNewe

Page 379

Chapter 444Properties and methods of the document object The following table details the properties and methods of the document object that are taken

Page 380

Chapter 31440site.canUncloak()AvailabilityDreamweaver MXDescriptionDetermines whether Dreamweaver can perform an uncloaking operation. ArgumentssiteOr

Page 381

441External application functionsExternal application functions handle operations that are related to the Macromedia Flash MX application and to the b

Page 382

442dreamweaver.getBrowserList()AvailabilityDreamweaver 3DescriptionGets a list of all the browsers in the Preview in Browser submenuArgumentsNone.Retu

Page 383

443ReturnsA string that contains the name of the text editor that is suitable for presentation in the UI, not the full path.dreamweaver.getFlashPath()

Page 384 - • An event handler

444ReturnsAn array that contains a pair of strings. The first string in the pair is the name of the editor, and the second string is its location on t

Page 385 - –1 if no

445• help.xml The help.xml file maps book IDs to Help book names. For example, the following XML code maps the book ID for Dreamweaver MX Help to the

Page 386

446dreamweaver.openWithBrowseDialog()AvailabilityDreamweaver 3DescriptionOpens the Select External Editor dialog box to let the user choose the applic

Page 387

447dreamweaver.validateFlash()AvailabilityDreamweaver MXDescriptionDetermines whether Flash MX (or a later version) is installed on the local computer

Page 388 - Clipboard functions

448dom.convertToXHTML()AvailabilityDreamweaver MXDescriptionParses the HTML into a DOM tree, inserts missing items that are required for XHTML, cleans

Page 389 - &lt; and &gt;

449dom.getIsXHTMLDocument() AvailabilityDreamweaver MXDescriptionChecks a document (specifically, the <!DOCTYPE> declaration) to see whether it

Page 390

The Dreamweaver Document Object Model 45Properties and methods of HTML tag objects Every HTML tag is represented by a JavaScript object. Tags are orga

Page 391

450DescriptionOpens the Choose Folder dialog box with the specified label in the title bar.Arguments{titleBarLabel} {, directoryToStartIn}• titleBarLa

Page 392 - • Code Hints menus

451ReturnsThe document object for the newly created document. This is the same value that dreamweaver.getDocumentDOM()returns.dreamweaver.createXHTMLD

Page 393

452dreamweaver.createXMLDocument()AvailabilityDreamweaver MXDescriptionCreates and opens a new XML file, which is empty except for the XML directive.A

Page 394

453Enabler“dreamweaver.canExportTemplateDataAsXML()” on page 420Exampleif(dreamweaver.canExportTemplateDataAsXML()){dreamweaver.exportTemplateDataAsXM

Page 395

454dreamweaver.newDocumentDOM()AvailabilityDreamweaver MXDescriptionProvides access to the editable tree for a new, empty document. This works in the

Page 396

455dreamweaver.newFromTemplate()AvailabilityDreamweaver 3DescriptionCreates a new document from the specified template. If no argument is supplied, th

Page 397

456Note: This function cannot be called from Behavior action or object files because it causes an error.ArgumentsfileNamefileName is the filename to o

Page 398

457dreamweaver.revertDocument()AvailabilityDreamweaver 3DescriptionReverts the specified document to the previously saved version.ArgumentsdocumentObj

Page 399

458ArgumentsdocumentObject {, fileURL}• documentObject is the object at the root of a document’s DOM tree, which is the value that dreamweaver.getDocu

Page 400 - Command functions

459dreamweaver.saveFrameset()AvailabilityDreamweaver 3DescriptionSaves the specified frameset, or opens the Save As dialog box if the frameset has not

Page 401 - Components functions

Chapter 446Properties and methods of text objects Each contiguous block of text in an HTML document (for example, the text within a P tag) is represen

Page 402 - Conversion functions

460Find/replace functions Find/replace functions handle find and replace operations. They cover basic functionality, such as finding the next instance

Page 403 - CSS Styles functions

461ArgumentsNone.ReturnsNothing.dreamweaver.setUpComplexFind()AvailabilityDreamweaver 3DescriptionPrepares for an advanced text or tag search by loadi

Page 404

462ExampleThe first statement in the following example sets up a tag search and specifies that the scope of the search should be four files. The secon

Page 405

463dreamweaver.setUpFindReplace()AvailabilityDreamweaver 3DescriptionPrepares for a text or HTML source search by defining the search parameters and t

Page 406

464ReturnsNothing.Enabler“dreamweaver.canShowFindDialog()” on page 424dreamweaver.showFindReplaceDialog()AvailabilityDreamweaver 3DescriptionOpens the

Page 407

465dom.isDocumentInFrame()AvailabilityDreamweaver 4DescriptionIdentifies whether the current document is being viewed inside a frameset.ArgumentsNone.

Page 408 - Data source functions

466General editing functionsYou handle general editing functions in the Document window. These functions insert text, HTML, and objects; apply, change

Page 409 - Enablers

467ReturnsNothing.dom.editAttribute()AvailabilityDreamweaver 3DescriptionDisplays the appropriate interface for editing the specified attribute. In mo

Page 410

468dom.getFontMarkup()AvailabilityDreamweaver 3DescriptionGets the value of the specified attribute of the FONT tag for the current selection.Argument

Page 411

469DescriptionGets the style of the selected list.ArgumentsNone.ReturnsA string that contains the tag that is associated with the list ("ul"

Page 412

The Dreamweaver Document Object Model 47The dreamweaver and site objectsDreamweaver implements the standard objects that are accessible through the DO

Page 413

470markupTagName is the name of the tag that you’re checking. It must be one of the following strings: "b", "cite", "code&quo

Page 414

471The result appears in the Document window, as shown in the following figure:dom.insertObject()AvailabilityDreamweaver 3DescriptionInserts the speci

Page 415

472ExampleThe following code inserts &lt;b&gt;130&lt;/b&gt; into the current document:var theDOM = dreamweaver.getDocumentDOM();theDOM

Page 416

473dom.outdent()AvailabilityDreamweaver 3DescriptionOutdents the selection.ArgumentsNone.ReturnsNothing.dom.removeCharacterMarkup()AvailabilityDreamwe

Page 417

474dom.removeLink()AvailabilityDreamweaver 3DescriptionRemoves the hypertext link from the selection.ArgumentsNone.ReturnsNothing.dom.resizeSelection(

Page 418

475ArgumentslinkHREFlinkHREF is the URL (document-relative path, root-relative path, or absolute URL) comprising the link. If this argument is omitted

Page 419

476ArgumentsNone.ReturnsNothing.Enabler“dom.canShowListPropertiesDialog()” on page 416dom.setListTag()AvailabilityDreamweaver 3DescriptionSets the sty

Page 420

477dom.setTextFormat()AvailabilityDreamweaver 4DescriptionSets the block format of the selected text.ArgumentsblockFormat blockFormat is a string that

Page 421

478dreamweaver.editFontList()AvailabilityDreamweaver 3DescriptionOpens the Edit Font List dialog box.ArgumentsNone.ReturnsNothing.dreamweaver.getFontL

Page 422

479ReturnsAn array of three Boolean values that indicates what the font supports. The first value indicates whether the font supports Bold, the second

Page 423

Chapter 448The site objectThe site object has no properties. For information about the methods of the dreamweaver and site objects, see “The Dreamweav

Page 424

480dreamweaver.getSystemFontList()AvailabilityDreamweaver 4DescriptionReturns a list of fonts for the system. This function can get either all fonts o

Page 425

481ArgumentsNone.ReturnsA Boolean value that indicates whether the option is ondreamweaver.quitApplication()AvailabilityDreamweaver 3DescriptionQuits

Page 426

482Argumentssource, title• source is a string that contains source code, which represents the dynamic data object. It is the same string that returned

Page 427

483ReturnsNothing.Global document functionsGlobal document functions act on an entire document. They check spelling, check target browsers, set page p

Page 428

484ReturnsNothing.Enabler“canAcceptCommand()” on page 62.dom.showPagePropertiesDialog()AvailabilityDreamweaver 3DescriptionOpens the Page Properties d

Page 429

485ArgumentsNSorIE, tagObject• NSorIE must be either "NS 4.0" or "IE 4.0". The DOM and rules for nested references differ in Netsc

Page 430

486dreamweaver.getPreferenceString()AvailabilityDreamweaver MXDescriptionLets you retrieve a string preference setting that you stored for an extensio

Page 431

487dreamweaver.setPreferenceString()AvailabilityDreamweaver MXDescriptionAllows you to write a string preference setting for an extension, to be store

Page 432

488dom.undo()AvailabilityDreamweaver 3DescriptionUndoes the previous step in the document.ArgumentsNone.ReturnsNothing.Enabler“dom.canUndo()” on page

Page 433

489dreamweaver.playRecordedCommand()AvailabilityDreamweaver 3DescriptionPlays the recorded command in the active document.ArgumentsNone.ReturnsNothing

Page 434

Part IIExtension APIsUnderstand about functions that you need to write when you create new objects, toolbars, tag editors, floating panels, server beh

Page 435

490dreamweaver.stopRecording()AvailabilityDreamweaver 3DescriptionStops recording without prompting the user.ArgumentsNone.ReturnsNothing.Enabler“drea

Page 436

491DescriptionCopies the specified history steps to the Clipboard. Dreamweaver warns the user of possible unintended consequences if the specified ste

Page 437

492dreamweaver.historyPalette.getStepCount()AvailabilityDreamweaver 3DescriptionGets the number of steps in the History panel.ArgumentsNone.ReturnsAn

Page 438

493dreamweaver.historyPalette.getUndoState()AvailabilityDreamweaver 3DescriptionGets the current undo state.ArgumentsNone.ReturnsThe position of the U

Page 439

494ExampleThe following code saves the fourth, sixth, and eighth steps in the History panel as a command:dreamweaver.historyPalette.saveAsCommand([3,5

Page 440

495HTML style functionsHTML style functions handle applying, creating, and deleting HTML styles. Methods of the dreamweaver.htmlStylePalette object ei

Page 441

496dreamweaver.htmlStylePalette.editSelectedStyle()AvailabilityDreamweaver 3DescriptionOpens the Define HTML Style dialog box for the selected style.A

Page 442 - • "Fireworks 3"

497ArgumentsNone.ReturnsNothing.dreamweaver.htmlStylePalette.setSelectedStyle()AvailabilityDreamweaver 3DescriptionSelects the specified style in the

Page 443

498JavaScript debugger functionsThese commands customize the behavior of the Dreamweaver JavaScript Debugger. For more information about the Dreamweav

Page 444 - • Help book

499ArgumentsdebuggerModule, outputFileName• debuggerModule is the name of a special Dreamweaver module file that implements the instrumentation API. T

Page 445

Contents 5CHAPTER 12Floating Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125How float

Page 447

500dreamweaver.debugDocument()AvailabilityDreamweaver 4DescriptionCreates the debug version of the current document and opens it in the browser. This

Page 448

501dreamweaver.getIsAnyBreakpoints()AvailabilityDreamweaver 4DescriptionFinds any breakpoints that are set in any files.ArgumentsNone.ReturnsA Boolean

Page 449

502ReturnsNothing.Keyboard functionsKeyboard functions mimic document navigation tasks that are accomplished by pressing the arrow, Backspace, Delete,

Page 450

503dom.arrowRight()AvailabilityDreamweaver 3DescriptionMoves the insertion point right the specified number of times.Arguments{nTimes}, {bShiftIsDown}

Page 451

504ReturnsNothing.dom.deleteKey()AvailabilityDreamweaver 3DescriptionEquivalent to pressing the Delete key the specified number of times. The exact be

Page 452 - {filePath}

505ReturnsNothing.dom.nextParagraph()AvailabilityDreamweaver 3DescriptionMoves the insertion point to the beginning of the next paragraph or skips mul

Page 453

506Arguments{nTimes}, {bShiftIsDown}• nTimes is the number of pages that the insertion point is to move down. If this argument is omitted, the default

Page 454

507dom.previousWord()AvailabilityDreamweaver 3DescriptionMoves the insertion point to the beginning of the previous word or skips multiple words if nT

Page 455

508ReturnsNothing.dreamweaver.mapKeyCodeToChar()AvailabilityDreamweaver 4DescriptionTakes a key code as retrieved from the event object’s keyCode fiel

Page 456

509ArgumentstoBackOrFronttoBackOrFront is the direction in which the hotspots are to move—that is front or back. ReturnsNothing.Enabler“dom.canArrange

Page 457

51CHAPTER 5ObjectsObjects are designed to insert a specific string of code into a user’s document. An object appears in a tab in the Insert bar and in

Page 458

510Argumentsleft, top, bottom, right• left is the new position of the left boundary of the layer or hotspot.• top is the new position of the top bound

Page 459

511Layout environment functionsLayout environment functions handle operations that are related to the settings for working on a document. They affect

Page 460 - Find/replace functions

512Enabler “dom.hasTracingImage()” on page 418dom.loadTracingImage()AvailabilityDreamweaver 3DescriptionOpens the Select Image Source dialog box. If t

Page 461

513DescriptionSets the origin of the ruler.ArgumentsxCoordinate, yCoordinate• xCoordinate is a value, expressed in pixels, on the horizontal axis.• yC

Page 462

514ArgumentsopacityPercentageopacityPercentage must be a number between 0 and 100.ReturnsNothing.Enabler“dom.hasTracingImage()” on page 418ExampleThe

Page 463

515ArgumentsNone.ReturnsA Boolean value that indicates whether the selection is currently being played with a plug-in.Enabler“dom.canStopPlugin()” on

Page 464 - • "main_content"

516Layout view functionsLayout view functions handle operations that change the layout elements within a document. They affect table, column, and cell

Page 465

517DescriptionCreates a layout table in the current document at the specified position and dimensions, either within an existing table or in the area

Page 466 - General editing functions

518dom.getClickedHeaderColumn()AvailabilityDreamweaver 4DescriptionIf the user clicked a menu button in the header of a table in Layout view, causing

Page 467

519DescriptionDetermines whether a column is set to expand and contract automatically, depending on the document size. This function fails if the curr

Page 468

Chapter 552Adding objects to the Insert barEach Object file has an associated 18 x 18 pixel image that appears in the Insert bar. If you create a larg

Page 469

520ArgumentscolNumcolNum is the column from which to remove the spacer image.ReturnsNothing.dom.setColumnAutostretch()AvailabilityDreamweaver 4Descrip

Page 470

521DescriptionPlaces the current document in Layout view if bShow is true.ArgumentsbShowbShow is a Boolean value that toggles the current document bet

Page 471

522ArgumentsNone.ReturnsNothing.dom.detachFromTemplate()AvailabilityDreamweaver 3DescriptionDetaches the current document from its associated template

Page 472

523dom.getIsLibraryDocument()AvailabilityDreamweaver 3DescriptionDetermines whether the document is a library itemArgumentsNone.ReturnsA Boolean value

Page 473

524dom.insertLibraryItem()AvailabilityDreamweaver 3DescriptionInserts an instance of a library item into the document.ArgumentslibraryItemURLlibraryIt

Page 474

525dom.removeEditableRegion()AvailabilityDreamweaver 3DescriptionRemoves an editable region from the document. If the editable region contains any con

Page 475

526Enabler“dreamweaver.canExportTemplateDataAsXML()” on page 420Exampleif(dreamweaver.canExportTemplateDataAsXML()){dreamweaver.exportTemplateDataAsXM

Page 476

527dreamweaver.getLiveDataMode()AvailabilityDreamweaver UltraDev 1DescriptionDetermines whether the Live Data window is currently visible.ArgumentsNon

Page 477

528ReturnsAn array that contains the URL parameters for the current document. The array contains an even number of parameter strings. Each two element

Page 478

529DescriptionSpecifies the error message to display if an error occurs while the liveDataTranslateMarkup() function executes in a translator. If the

Page 479

Objects 53ContainerNone.Example<insertbar><category>DescriptionDefines a tab on the Insert bar. Attributesid, folder, {showif}ContentsCont

Page 480 - Global application functions

530You enter the URL parameters in name-value pairs. For example, if you reference the URL variables ID and Name in server scripts in your document, y

Page 481

531ReturnsA Boolean value that indicates whether the menu needs to be updated. This function returns false only if “dreamweaver.notifyMenuUpdated()” o

Page 482

532Path functionsPath functions get and manipulate the paths to various files and folders on a user’s hard disk. These functions determine the path to

Page 483 - Global document functions

533dreamweaver.getSiteRoot()AvailabilityDreamweaver 1.2DescriptionGets the local root folder (as specified in the Site Definition dialog box) for the

Page 484

534Print functionThe print function lets the user print code from Code view.dreamweaver.PrintCode()AvailabilityDreamweaver MXDescriptionIn Windows, pr

Page 485

535ArgumentsNone.ReturnsNothing.dom.selectParent()AvailabilityDreamweaver 3DescriptionSelects the parent of the current selection. Calling this functi

Page 486

536ExampleThe following code wraps a link around the current selection:var theDOM = dw.getDocumentDOM();var theSel = theDOM.getSelectedNode();if (theS

Page 487 - History functions

537DescriptionOpens the Reports dialog box.ArgumentsNone.ReturnsNothing.Results window functionsResults window functions let you create a stand-alone

Page 488 - “dom.canUndo()” on page 417

538• strIcon is the path to the icon to use. To display a built-in icon, use a value 1 through 10 instead of the fully qualified path name of the icon

Page 489

539• strDesc is the description to go along with the entry.• iLineNo is the number of lines in file (optional).• iStartSel is the start of offset into

Page 490

Chapter 554Attributesid, image, {disabledImage}, {showIf}, {enabled}, {checked}, {command}, {file}, {tag}, {name}ContentsNone.ContainerThe category ta

Page 491

540• arrFilePaths is an array of file or folder paths to iterate through.• bRecursive is a Boolean value that indicates whether the iteration should b

Page 492

541Working with the built-in Results panel groupThese functions produce output in the Results panel group. The Results panel group displays tabbed rep

Page 493

542ReturnsNothing.Enabler“dreamweaver.resultsPalette.canClipCopy()” on page 427dreamweaver.resultsPalette.clipCut()AvailabilityDreamweaver MXDescripti

Page 494

543ReturnsNothing.Enabler“dreamweaver.resultsPalette.canOpenInBrowser()” on page 427dreamweaver.resultsPalette.openInEditor()AvailabilityDreamweaver M

Page 495 - HTML style functions

544ReturnsNothing.Enabler“dreamweaver.resultsPalette.canSelectAll()” on page 428Server debuggingDreamweaver can request files from ColdFusion and disp

Page 496

545For example:<serverdebuginfo><context><template><![CDATA[/ooo/master.cfm]]></template><path><![CDATA[C:\serv

Page 497

546Selection functions Selection functions get and set the selection in open documents. For information on getting or setting the selection in the Sit

Page 498 - JavaScript debugger functions

547DescriptionGets the position of a specific node in the DOM tree, which is expressed as character offsets into the document’s source code. It is val

Page 499

548dom.selectAll()AvailabilityDreamweaver 3DescriptionPerforms a Select All operation.Note: In most cases this function selects all the content in the

Page 500

549ReturnsNothing.dom.setSelection()AvailabilityDreamweaver 3DescriptionSets the selection in the document.ArgumentsoffsetBegin, offsetEndThe argument

Page 501

Objects 55image="image_path" Required. Specifies the path, relative to the Dreamweaver Configuration folder, to the icon file that appears o

Page 502 - Keyboard functions

550Examplefunction applyFormatToSelectedTable(){// get current selectionvar selObj = dw.getDocumentDOM().getSelectedNode();alternateRows(dwscripts.fin

Page 503

551Server behavior functions Server behavior functions let you manipulate the Server Behaviors panel, which you can display by selecting Window > S

Page 504

552Server model functionsIn Macromedia Dreamweaver MX, each document has an associated document type. For dynamic document types, Dreamweaver also ass

Page 505

553ExampleIf the user creates a site and specifies that the testing server is on the local computer and that the root folder is named "employeeap

Page 506

554ReturnsA string, the value of which is the name of the folder.dom.serverModel.getServerExtension()AvailabilityDreamweaver UltraDev 4, deprecated in

Page 507

555ExampleThe following snippet from a participant file illustrates a translator searchPatterns tag:<searchPatterns whereToSearch="comment&quo

Page 508

556ReturnsA JavaScript object that contains a variety of information that is specific to the current server model.dom.serverModel.getServerLanguage()A

Page 509

557Note: In addition to letting you call this function from the JavaScript layer, Dreamweaver MX calls this function when the user changes the encodin

Page 510

558Site functionsSite functions handle operations that are related to files in the site files or site map. These functions let you perform the followi

Page 511 - • "px"

559ArgumentsNone.ReturnsNothing.Enabler“site.canAddLink()” on page 433site.addLinkToNewFile()AvailabilityDreamweaver 3DescriptionOpens the Link to New

Page 512

Chapter 556command="script " Required unless the command attribute is specified. Do not specify both the command and the file attributes for

Page 513

560site.changeLink()AvailabilityDreamweaver 3DescriptionOpens the Select HTML File dialog box to let the user select a new file for the link.Arguments

Page 514

561ArgumentsscopeOfCheckscopeOfCheck specifies where links will be checked. It must be "document", "selection", or "site"

Page 515

562site.cloak()AvailabilityDreamweaver MXDescriptionCloaks the current selection in the Site panel or the specified folder.ArgumentssiteOrURLsiteOrURL

Page 516 - Layout view functions

563site.editColumns()DescriptionIn Dreamweaver MX, displays the Edit Sites dialog box; in Dreamweaver 4 and earlier versions, displays the Edit Sites

Page 517

564homepage="C:\Documents and Settings\jlondon\Desktop\DWServer\Untitled-2.htm" pagesperrow="200" columnwidth="125" show

Page 518

565site.findLinkSource()AvailabilityDreamweaver 3DescriptionOpens the file that contains the selected link or dependent file, and highlights the text

Page 519

566DescriptionReturns the access method that is used for all files on the current site’s application server. The current site is the site that is asso

Page 520

567ExampleA call to site.getCheckOutUser() might return "denise (deniseLaptop)". If no check-out name is specified, only the login is return

Page 521

568ReturnsA Boolean value that indicates whether the remote site is connected.Enabler“site.canConnect()” on page 435site.getCurrentSite()AvailabilityD

Page 522

569site.getLocalPathToFiles()AvailabilityDreamweaver MXDescriptionDetermines the disk path to the local files that are defined for the current site. T

Page 523

Objects 57The Objects APIThis section describes the functions in the Objects API. You must define either the insertObject() function or the objectTag(

Page 524

570site.getSites()AvailabilityDreamweaver 3DescriptionGets a list of the defined sites.ArgumentsNone.ReturnsAn array of strings that represents the na

Page 525

571site.isCloaked()AvailabilityDreamweaver MXDescriptionDetermines whether the current selection in the Site panel or the specified folder is cloaked.

Page 526 - Live data functions

572Enabler“site.canMakeEditable()” on page 436site.makeNewDreamweaverFile()AvailabilityDreamweaver 3DescriptionCreates a new Dreamweaver file in the S

Page 527 - Name Samuel

573site.newSite()AvailabilityDreamweaver 3DescriptionOpens the Site Definition dialog box for a new, unnamed site.ArgumentsNone.ReturnsNothing.site.op

Page 528

574ReturnsNothing.Enabler“site.canPut()” on page 437site.recreateCache()AvailabilityDreamweaver 3DescriptionRecreates the cache for the current site.A

Page 529

575ReturnsA Boolean value that indicates whether a remote site has been defined and, if the server type is Local/Network, whether the drive is mounted

Page 530 - Menu functions

576Enabler“canAcceptCommand()” on page 62site.saveAsImage()AvailabilityDreamweaver 3DescriptionOpens the Save As dialog box to let the user save the s

Page 531

577site.selectNewer()AvailabilityDreamweaver 3DescriptionSelects all files that are newer on the specified side of the Site panel.ArgumentswhichSidewh

Page 532 - Path functions

578site.setConnectionState()AvailabilityDreamweaver 3DescriptionSets the connection state of the current site.ArgumentsbConnectedbConnected is a Boole

Page 533

579site.setLayout()AvailabilityDreamweaver 3DescriptionOpens the Site Map Layout pane of the Site Definition dialog box.ArgumentsNone.ReturnsNothing.E

Page 534 - Quick Tag Editor Functions

Chapter 558isDomRequired()DescriptionDetermines whether the object requires a valid DOM to operate. If this function returns true or if the function i

Page 535

580site.synchronize()AvailabilityDreamweaver 3DescriptionOpens the Synchronize Files dialog box.ArgumentsNone.ReturnsNothing.Enabler“site.canSynchroni

Page 536 - Report Functions

581ReturnsNothing.Enabler“site.canUncloak()” on page 440site.undoCheckOut()AvailabilityDreamweaver 3DescriptionRemoves the lock files that are associa

Page 537 - Results window functions

582Snippets panel functionsUsing Macromedia Dreamweaver MX, web developers can edit and save reusable blocks of code in the Snippets panel and retriev

Page 538 - ; specify null if not used

583dreamweaver.snippetPalette.newFolder()AvailabilityDreamweaver MXDescriptionCreates a new folder with the default name untitled and puts an text box

Page 539

584DescriptionApplies selected snippet from Panel to the current selection.ArgumentsNone.ReturnsNothing.Enabler“dw.snippetpalette.canInsert()” on page

Page 540

585String manipulation functionsString manipulation functions help you get information about a string as well as convert a string from Latin 1 encodin

Page 541

586dreamweaver.latin1ToNative()AvailabilityDreamweaver 2DescriptionConverts a string in Latin 1 encoding to the native encoding on the user’s computer

Page 542

587Dreamweaver calls the seven callback functions on the following occasions:1 Dreamweaver calls openTagBegin() for each opening tag (for example, <

Page 543

588ExampleThe following sequence of steps provide an example of how to use the dreamweaver.scanSourceString() function.Steps1 You create an implementa

Page 544

589dom.formatSelection()AvailabilityDreamweaver MXDescriptionApplies Dreamweaver automatic syntax formatting to the selected content (the same as choo

Page 545 - Nothing

Objects 59Example function insertObject() { var theForm = document.forms[0];var nameVal = theForm.firstField.value;var passwordVal = theForm.secondFie

Page 546 - Selection functions

590dom.isSelectionValid()AvailabilityDreamweaver 4DescriptionDetermines whether a selection is valid, meaning it is currently synchronized with the De

Page 547

591ReturnsNothing.dom.source.arrowLeft()AvailabilityDreamweaver 4DescriptionMoves the insertion point to the left in the current line of the Source vi

Page 548 - and passing

592Arguments{nTimes}, {bShiftIsDown}• nTimes is the number of lines that the insertion point is to move. If the nTimes argument is omitted, the defaul

Page 549 - , offsetEnd

593DescriptionPlaces the insertion point at the end of the current line. If content is already selected, this function extends the selection to the en

Page 550

594ArgumentsNone.ReturnsA pair of integers that represent offsets from the beginning of the source document. The first integer is the beginning of the

Page 551 - Server behavior functions

595dom.source.insert()DescriptionInserts the specified string into the source code at the specified offset from the beginning of the source file. If t

Page 552 - Server model functions

596dom.source.pageDown()AvailabilityDreamweaver 4DescriptionMoves the insertion point down the source view document, page by page. If content is alrea

Page 553

597Arguments{nTimes}, {bShiftIsDown}• nTimes is the number of words that the insertion point is to move. If nTimes is omitted, the default is 1.• bShi

Page 554 - • File references

598DescriptionScrolls the Source view down line by line without moving the insertion point.ArgumentsnTimesnTimes is the number of lines to scroll. If

Page 555

599ReturnsNothing.dom.source.scrollTopFile()AvailabilityDreamweaver 4DescriptionScrolls the Source view to the top of the document file without moving

Page 556

Contents6CHAPTER 20JavaScript Debugger Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243How the JavaScript Debugger

Page 557

Chapter 560windowDimensions()DescriptionSets specific dimensions for the Options dialog box. If this function is not defined, the window dimensions ar

Page 558

600dom.source.startOfDocument()AvailabilityDreamweaver 4DescriptionPlaces the insertion point at the beginning of the source view document. If content

Page 559

601ReturnsNothing.dom.source.wrapSelection()AvailabilityDreamweaver 4DescriptionInserts the text of startTag before the current selection and the text

Page 560

602Table editing functionsTable functions add and remove table rows and columns, change column widths and row heights, convert measurements from pixel

Page 561

603dom.decreaseRowspan()AvailabilityDreamweaver 3DescriptionDecreases the row span by oneArgumentsNone.ReturnsNothing.Enabler“dom.canDecreaseRowspan()

Page 562 - “site.canCloak()” on page 434

604dom.doDeferredTableUpdate()AvailabilityDreamweaver 3DescriptionIf the Faster Table Editing option is selected in the General preferences, it forces

Page 563

605DescriptionIncreases the row span by one.ArgumentsNone.ReturnsNothing.Enabler“dom.canDecreaseRowspan()” on page 412dom.insertTableColumns()Availabi

Page 564

606dom.mergeTableCells()AvailabilityDreamweaver 3DescriptionMerges the selected table cells.ArgumentsNone.ReturnsNothing.Enabler“dom.canMergeTableCell

Page 565 - “site.canGet()” on page 435

607ArgumentstdOrThtdOrTh must be either "td" or "th".ReturnsNothing.dom.setTableColumns()AvailabilityDreamweaver 3DescriptionSets

Page 566 - • source_control

608dom.splitTableCell()AvailabilityDreamweaver 3DescriptionSplits the current table cell into the specified number of rows or columns. If one or both

Page 567

609DescriptionChecks the .vtm files to see if a tag editor has been defined for the tag. If so, the editor for that tag pops up and accepts the start

Page 568

61CHAPTER 6CommandsCommands can be used to perform almost any kind of edit to a user’s current document, other open documents, or to any HTML document

Page 569

610ArgumentsNone.ReturnsNone.dreamweaver.tagLibrary.getTagLibraryDOM()AvailabilityDreamweaver MXDescriptionGiven the URL of a filename.vtm file, this

Page 570

611dreamweaver.tagLibrary.importDTDOrSchema()AvailabilityDreamweaver MXDescriptionImports a DTD or schema file from a remote server into the Tag Libra

Page 571

612Tag inspector functionsThese JavaScript functions manipulate the generic Tag inspector panel, specifically the context menus in the Tag inspector p

Page 572

613ReturnsNothing.Enabler“dreamweaver.tagInspector.tagAfterEnabled()” on page 430dreamweaver.tagInspector.deleteTags()AvailabilityDreamweaver MXDescri

Page 573 - “site.canOpen()” on page 437

614Timeline functions Timeline functions act on timelines. They add, remove, and change objects in a timeline; add behaviors, frames, and keyframes to

Page 574

615Enabler“dreamweaver.timelineInspector.canAddKeyFrame()” on page 431dreamweaver.timelineInspector.addObject()AvailabilityDreamweaver 3DescriptionAdd

Page 575

616DescriptionGets the state of the Autoplay option for the current timeline.ArgumentsNone.ReturnsA Boolean value that indicates whether the Autoplay

Page 576

617dreamweaver.timelineInspector.removeBehavior()AvailabilityDreamweaver 3DescriptionRemoves the selected behavior from the timeline.ArgumentsNone.Ret

Page 577

618dreamweaver.timelineInspector.removeObject()AvailabilityDreamweaver 3DescriptionRemoves the currently selected object from the timeline.ArgumentsNo

Page 578

619ArgumentsbAutoplaybAutoplay is a Boolean value that indicates whether to turn on the Autoplay option.ReturnsNothing.dreamweaver.timelineInspector.s

Page 579

Chapter 662The Command APIThe custom functions in the Command API are not required.canAcceptCommand()DescriptionDetermines whether the command is appr

Page 580

620Toggle functionsToggle functions get and set various options either on or off.dom.getEditNoFramesContent()AvailabilityDreamweaver 3DescriptionGets

Page 581

621DescriptionDetermines whether auto-indenting is on in the Code view of the Document window.ArgumentsNone.ReturnsReturns true if auto-indenting is o

Page 582

622dom.getShowInvalidHTML()AvailabilityDreamweaver 4DescriptionDetermines whether invalid HTML code is currently highlighted in the Code view of the D

Page 583

623ArgumentsNone.ReturnsA Boolean value that indicates whether layer borders are visible (true) or not (false).dom.getShowLineNumbers()AvailabilityDre

Page 584

624DescriptionGets the current state of the View > Table Borders option.ArgumentsNone.ReturnsA Boolean value that indicates whether table borders a

Page 585

625dom.getSnapToGrid()AvailabilityDreamweaver 3DescriptionGets the current state of the View > Grid > Snap To option.ArgumentsNone.ReturnsA Bool

Page 586

626DescriptionTurns the Prevent Layer Overlaps option on (true) or off (false).ArgumentsbPreventLayerOverlapsReturnsNothing.dom.setShowFrameBorders()A

Page 587

627dom.setShowInvalidHTML()AvailabilityDreamweaver 4DescriptionTurns highlighting of invalid HTML code on or off in the Code view of the Document wind

Page 588 - , endOffset

628ArgumentsbShowLayerBordersReturnsNothing.dom.setShowLineNumbers()AvailabilityDreamweaver 4DescriptionShows or hides the line numbers in the Code vi

Page 589

629dom.setShowTableBorders()AvailabilityDreamweaver 3DescriptionTurns the View > Table Borders option on (true) or off (false).ArgumentsbShowTableB

Page 590

Commands 63isDomRequired()DescriptionDetermines whether the command requires a valid DOM to operate. If this function returns true or if the function

Page 591

630ArgumentsbShowbShow is a Boolean value that indicates whether the line numbers should be visible (true) or not (false).ReturnsNothing.dom.setSnapTo

Page 592

631dreamweaver.htmlInspector.getShowAutoIndent()AvailabilityDreamweaver 4DescriptionDetermines whether auto-indenting is on in the Code view of the Co

Page 593

632ReturnsReturns true if syntax coloring is on.dreamweaver.htmlInspector.getShowWordWrap()AvailabilityDreamweaver 4DescriptionDetermines whether word

Page 594

633dreamweaver.htmlInspector.setShowLineNumbers()AvailabilityDreamweaver 4DescriptionShows or hides the line numbers in the Code view of the Code insp

Page 595 - , string

634dreamweaver.setHideAllFloaters()AvailabilityDreamweaver 3DescriptionTurns on either the Hide Floating panels option (true) or the Show Floating pan

Page 596

635ArgumentsNone.ReturnsA Boolean value that indicates whether hidden files are visible in the site map (true) or not (false).site.getShowPageTitles()

Page 597

636site.setShowHiddenFiles()AvailabilityDreamweaver 3DescriptionTurns the Show Files Marked as Hidden option in the site map on (true) or off (false).

Page 598

637Toolbar functionsThe following JavaScript functions let you get and set the visibility of toolbars and toolbar labels, obtain the labels of toolbar

Page 599

638Examplevar dom = dw.getDocumentDOM();if(dom != null && dom.getToolbarVisibility("myEditbar") == false){dom.setToolbarVisibility(&

Page 600

639ArgumentsNone.ReturnsAn array of all toolbar IDs.Examplevar tb_ids = new Array();tb_ids = dom.getToolbarIdArray();dom.getToolbarLabel()Availability

Page 601

Chapter 664windowDimensions()DescriptionSets specific dimensions for the Parameters dialog box. If this function is not defined, the window dimensions

Page 602 - Table editing functions

640dom.getShowToolbarIconLabels()AvailabilityDreamweaver MXDescriptionDetermines whether labels for buttons are visible in the current document window

Page 603

641DescriptionDepending on the value of the argument, this function makes locked regions editable or noneditable. By default, locked regions are noned

Page 604

642The default value of the argument is false. Dreamweaver automatically uses the untranslated source for subsequent calls to dw.getSelection(), dw.se

Page 605

643DescriptionDetermines which view is visible.ArgumentsNone.Returns"design", "code", or "split", depending on the visib

Page 606

644ReturnsNothing.Exampleif(dw.isMDI()){dw.cascade()}dreamweaver.getActiveWindow()AvailabilityDreamweaver 3DescriptionGets the document in the active

Page 607

645The floaterName values for built-in Dreamweaver panels are the strings to the right of the panel names in the following list: Assets = "assets

Page 608

646• "textView" if the Text view is in focus• "html" if the Code inspector is in focus• floaterName, if bAllowFloaters is true and

Page 609 - • A tag, an in <input>

647Returnstrue if Dreamweaver is in MDI mode; false if Dreamweaver is in classic mode.Exampleif(dw.isMDI()){dw.cascade()}dreamweaver.minimizeRestoreAl

Page 610 - "HTML/img.vtm"

648ArgumentsfloaterName, bIsVisible• floaterName is the name of a floating panel. If floaterName does not match one of the built-in panel names, Dream

Page 611 - • tagName: a string

649ArgumentsviewStringviewString is the view to bring to the top of the Document window; it can be one of the following values: "design" or

Page 612 - Tag inspector functions

Commands 65A simple command exampleThe following command converts the selected text to all lowercase characters. The command is very simple. It does n

Page 613

650ReturnsNothing.Exampleif(dw.isMDI()){dw.tileHorizontally()}dreamweaver.tileVertically()AvailabilityDreamweaver MX (Windows only)DescriptionIn MDI m

Page 614 - Timeline functions

651dreamweaver.updateReference()AvailabilityDreamweaver 4DescriptionUpdates the Reference floating panel. If the Reference floating panel is not visib

Page 616

653APPENDIX ADeprecated JavaScript API functionsThe functions in this appendix are deprecated JavaScript API functions. Deprecated functions work but

Page 617

Appendix A654ArgumentsNone.ReturnsA string that represents the event. This is the same string that is passed as an argument (event) to the canAcceptBe

Page 618

655• Dreamweaver does not return references for unnamed objects. If an object does not contain either a NAME or an ID attribute, Dreamweaver returns &

Page 619

Appendix A656Exampledreamweaver.getObjectTags("document", "IMG"), depending on the contents of the active document, might return a

Page 620 - Toggle functions

657ArgumentsNone.ReturnsA string that contains the path of the library item, which is expressed as a file:// URL.dreamweaver.libraryPalette.newFromDoc

Page 621

Appendix A658ReturnsNothing.dreamweaver.nodeToOffsets()AvailabilityDreamweaver 2, deprecated in 3 in favor of dom.nodeToOffsets().DescriptionGets the

Page 622

659dreamweaver.popupCommand()AvailabilityDreamweaver 2, deprecated in 3 in favor of dreamweaver.runCommand().DescriptionExecutes the specified command

Page 623

Chapter 666Adding commands to the Commands menuDreamweaver automatically adds any files that are inside the Configuration/Commands folder to the botto

Page 624

Appendix A660ArgumentsNone.ReturnsNothing.dreamweaver.templatePalette.renameSelectedTemplate()AvailabilityDreamweaver 3, deprecated in Dreamweaver 4 i

Page 625

661INDEXAaction files 135addBehavior() 380, 614addDebugContextData() 544addDynamicSource() 193addFrame() 614addItem() 537addKeyframe() 614addL

Page 626

Index662assetPalette.edit() 374assetPalette.getSelectedCategory() 374assetPalette.getSelectedItems() 374assetPalette.getSelectedView() 375assetPal

Page 627

Index 663JS_ValueToBoolean() 256JS_ValueToDouble() 255JS_ValueToInteger() 255JS_ValueToObject() 256JS_ValueToString() 255MM_ConfigFileExists() 2

Page 628

Index664category tag 53changeLink() 560changeLinkSitewide() 559changeObject() 615checkbox object 42checkbutton tag 53, 84checked attribute 91c

Page 629

Index 665names 324connectivity functions overview 337conventions, in book 12conversion functions 402convertLayersToTable() 402convertTablesToLaye

Page 630

Index666MMDB.showResultset() 333MMDB.showSPResultset() 334MMDB.showSPResultsetNamedParams() 334MMDB.testConnection() 324database connection dialog

Page 631

Index 667doesColumnHaveSpacer() 517doesGroupHaveSpacers() 517DOM. See Document Object Model.dom.addBehavior() 380dom.addSpacerToColumn() 516dom.al

Page 632

Index668dom.getRulerOrigin() 511dom.getRulerUnits() 511dom.getSelectedEditableRegion() 523dom.getSelectedNode() 546dom.getSelection() 546dom.getS

Page 633

Index 669dom.setColumnAutostretch() 520dom.setEditNoFramesContent() 625dom.setHideAllVisualAids() 625dom.setLayerTag() 510dom.setLinkHref() 474do

Page 634

67CHAPTER 7Menu CommandsMenu commands make menus more flexible and dynamic. As with regular commands, menu commands can be used to perform almost any

Page 635

Index670dreamweaver.assetPalette.addToFavoritesFromSiteAssets() 373dreamweaver.assetPalette.addToFavoritesFromSiteWindow() 373dreamweaver.assetPalet

Page 636

Index 671dreamweaver.findNext() 460dreamweaver.getActiveWindow() 644dreamweaver.getBehaviorElement() 381dreamweaver.getBehaviorEvent() 653dreamwea

Page 637 - Toolbar functions

Index672dreamweaver.loadSitesFromPrefs() 558dreamweaver.minimizeRestoreAll() 647dreamweaver.nativeToLatin1() 586dreamweaver.newDocumentDOM() 454dr

Page 638

Index 673dreamweaver.snippetPalette.remove() 584dreamweaver.snippetPalette.rename() 584dreamweaver.startDebugger() 501dreamweaver.startRecording()

Page 639

Index674dw.canExportTemplateDataAsXML() 420dw.canFindNext() 420dw.canOpenInFrame() 420dw.canPlayRecordedCommand() 421dw.canPopupEditTagDialog() 4

Page 640 - Translation functions

Index 675dw.getPrimaryView() 646dw.getRecentFileList() 454dw.getRedoText() 488dw.getSecondaryBrowser() 444dw.getShowDialogsOnInsert() 480dw.getSh

Page 641

Index676dw.resultsPalette.canSelectAll() 428dw.revertDocument() 457dw.runCommand() 400dw.saveAll() 457dw.saveDocument() 457dw.saveDocumentAs() 4

Page 642 - Window functions

Index 677Dynamic Data dialog box 191dynamic menussample code 75user experience 67dynamic templates 27Dynamic Text dialog box 191EEdit Format List

Page 643

Index678Ffile (field) object 42file attribute 90file I/O API 271DWfile.copy() 271DWfile.createFolder() 272DWfile.exists() 272DWfile.getAttribute

Page 644

Index 679getAttribute() 45getAttributes() 273getAutoplay() 615getBehavior() 380getBehaviorAt() 384getBehaviorCount() 384getBehaviorElement() 38

Page 645

Chapter 7685 Dreamweaver calls the receiveArguments() function, if defined, in the selected Menu Commands file to let the command process any argument

Page 646

Index680getModificationDateObj() 275GetNote() 293GetNoteLength() 294GetNotesKeyCount() 294GetNotesKeys() 294getObjectRefs() 654getObjectTags()

Page 647

Index 681getToolbarIdArray() 638getToolbarLabel() 639getToolbarVisibility() 637getTracingImageOpacity() 511getTranslatedAttribute() 45getTranslat

Page 648

Index682insertObject() 51, 58, 471insertTableColumns() 605insertTableRows() 605insertText tag 166insertText() 471inspectBehavior() 141inspectC

Page 649

Index 683locked content, inspecting 239*LOCKED* keyword 239MmakeCellWidthsConsistent() 519makeEditable() 571makeNewDreamweaverFile() 572makeNewFo

Page 650

Index684MMNotes.getSiteRootForFile() 290MMNotes.getVersionName() 290MMNotes.getVersionNum() 290MMNotes.localURLToFilePath() 290MMNotes.open() 291

Page 651

Index 685outputResultsPanel.debugWindow.addDebugContextData() 544outputResultsPanel.openInBrowser() 542outputResultsPanel.openInEditor() 543outputR

Page 652

Index686removeSpacerFromColumn() 519removeTimeline() 618renameSelectedItem() 657renameSelectedTemplate() 660renameSelection() 575renameTimeline()

Page 653 - APPENDIX A

Index 687SCS_IsConnected() 351SCS_IsRemoteNewer() 362SCS_ItemExists() 355SCS_NewFolder() 354SCS_Put() 353SCS_Rename() 354SCS_SetDesignNotes() 3

Page 654

Index688setInterval() 42setLayerTag() 510setLayout() 579setLinkHref() 474setLinkTarget() 475setLinkVisibility() 579setListBoxKind() 475setListT

Page 655

Index 689Shutdown folder 22site object 48methods of 371properties of 47site reports 103, 541site.addLinkToExistingFile() 558site.addLinkToNewFi

Page 656

Menu Commands 69commandButtons()DescriptionDefines the buttons that should appear on the right side of the Options dialog box and their behavior when

Page 657

Index690snapTracingImageToSelection() 514snippet tag, attributes 582snippetPalette.editSnippet() 583snippetPalette.insert() 583snippetPalette.inse

Page 658

Index 691Tag C hoo ser 111Tag D ialo g ex t ens ion sdefinition 20Tag editor APIapplyTag() 118inspectTag() 117validateTag() 117Tag editor func

Page 659

Index692updateCurrentPage() 525updatePages() 526updatePattern tag 174updatePatterns tag 173updateReference() 651URL property 44user configuratio

Page 660

Contents 7CHAPTER 29The JavaBeans API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345CHAPTER 30The S

Page 661

Chapter 770isCommandChecked()DescriptionDetermines whether to display a check mark next to the menu itemArguments{arg1}, {arg2},...{argN}If it is a dy

Page 662 - Index662

Menu Commands 71ReturnsDreamweaver expects nothing.Examplefunction receiveArguments(){var styleName = arguments[0];if (styleName == "(None)"

Page 663 - Index 663

Chapter 772windowDimensions()DescriptionSets specific dimensions for the Parameters dialog box. If this function is not defined, the window dimensions

Page 664 - Index664

Menu Commands 73A simple menu commandThe following menu command is associated with two menu items: Undo and Redo. It checks the arguments attribute of

Page 665 - Index 665

Chapter 774In this command, the receiveArguments() function processes the arguments and executes the command. More complex menu commands might call di

Page 666 - Index666

Menu Commands 75A simple dynamic menuThe following menu command generates the Preview in Browser submenu, and it launches the current file (or the sel

Page 667 - Index 667

Chapter 776 { var bHaveDocument; if (dw.getFocus() == ’site’) bHaveDocument = site.getSelection().length > 0; else bHaveDoc

Page 668 - Index668

77CHAPTER 8ToolbarsYou can create a toolbar for Macromedia Dreamweaver MX simply by creating a file that defines the toolbar and placing that file in

Page 669 - Index 669

Chapter 878How toolbars behaveIn Windows, Dreamweaver MX toolbars generally act the same as standard Windows toolbars. Dreamweaver MX toolbars have th

Page 670 - Index670

To o l b a r s 79How toolbar commands workWhen Dreamweaver draws a toolbar, the following events occur: 1 For each toolbar control item, Dreamweaver d

Page 671 - Index 671

Contents8Report Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536Results window f

Page 672 - Index672

Chapter 880After the declarations, the file consists of a single toolbarset tag, which contains any number of the following tags: toolbar, itemref, se

Page 673 - Index 673

To o l b a r s 81initiallyVisible="true" or "false". Specifies whether the toolbar should be visible the first time Dreamweaver lo

Page 674 - Index674

Chapter 882<include/>DescriptionLoads toolbar items from the specified file before continuing to load the current file. Toolbar items that are d

Page 675 - Index 675

To o l b a r s 83showIf="script" Specifies that this item appears only on the toolbar if the specified script returns true. For example, you

Page 676 - Index676

Chapter 884Attributesid, image, tooltip, command, {showif}, {disabledImage}, {overimage}, {label}, {file}, {domRequired}, {enabled}, {update}, {argume

Page 677 - Index 677

To o l b a r s 85<radiobutton>DescriptionA radio button is exactly the same as a check button, except that when it is off, it appears as a raise

Page 678 - Index678

Chapter 886Example<MENUBUTTON ID="DW_CodeNav"image="Toolbars/images/MM/codenav.gif"disabledImage="Toolbars/images/MM/coden

Page 679 - Index 679

To o l b a r s 87Example<COMBOBOX ID="Address_URL"width="300"tooltip="Address"label="Address: "file="T

Page 680 - Index680

Chapter 888Example<colorpicker id="Color_Example"image="Toolbars/images/colorpickerIcon.gif"disabledImage="Toolbars/images

Page 681 - Index 681

To o l b a r s 89disabledImage="image_path"Optional. Dreamweaver ignores the disabledImage attribute for items other than buttons, check but

Page 682 - Index682

Part IOverviewOrient yourself to concepts fundamental to writing Dreamweaver extensions These concepts include understanding available API categories,

Page 683 - Index 683

Chapter 890menuID="menu_id"Required for menu buttons and combo buttons, unless you specify getMenuID() in an associated command file. Dreamw

Page 684 - Index684

To o l b a r s 91checked="script"Required for check buttons and radio buttons. Dreamweaver ignores the checked attribute for other types of

Page 685 - Index 685

Chapter 892The following table lists the possible values for update_frequency_list, from least to most frequent. If you do not specify the update attr

Page 686 - Index686

To o l b a r s 93arguments="argument_list" Optional. The arguments attribute specifies the comma-separated list of arguments to pass to ther

Page 687 - Index 687

Chapter 894If you specified the arguments attribute for this toolbar item in the toolbars.xml file, those arguments are passed next. If you did not sp

Page 688 - Index688

To o l b a r s 95The name getDynamicContent() is a misnomer because this function should be used even if the list of entries in the menu is fixed. For

Page 689 - Index 689

Chapter 896Examplefunction getMenuID(){var dom = dw.getDocumentDOM();var menuID = ’’;if (dom){var view = dom.getView();var focus = dw.getFocus();if (v

Page 690 - Index690

To o l b a r s 97Examplefunction getUpdateFrequency(){return onSelChange”;}isCommandChecked()DescriptionReturns a value that specifies whether the ite

Page 691 - Index 691

Chapter 898ExampleThe following example determines which item, if any, should be checked in a pop-up menu of paragraph formats and CSS styles.function

Page 692 - Index692

To o l b a r s 99receiveArguments()DescriptionProcesses any arguments that are passed from a toolbar item. The receiveArguments() function is equivale

Comments to this Manuals

No comments