MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Spezifikationen

Stöbern Sie online oder laden Sie Spezifikationen nach Software MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API herunter. MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifications Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 692
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
macromedia
®
Extending Dreamweaver MX
Seitenansicht 0
1 2 3 4 5 6 ... 691 692

Inhaltsverzeichnis

Seite 1 - Extending Dreamweaver MX

macromedia™®Extending Dreamweaver MX

Seite 3 - CONTENTS

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

Seite 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

Seite 5

Chapter 8102

Seite 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

Seite 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

Seite 8 - Contents8

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

Seite 9 - Overview

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

Seite 10

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

Seite 11 - Introduction

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

Seite 12 - Chapter 112

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

Seite 13 - Results windows

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

Seite 14

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

Seite 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

Seite 16 - Flash Integration

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

Seite 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

Seite 18 - Chapter 218

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

Seite 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

Seite 20

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 26 - Chapter 226

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

Seite 27 - Extending Dreamweaver MX 27

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

Seite 28 - Chapter 228

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

Seite 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

Seite 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

Seite 31 - CHAPTER 3

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

Seite 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

Seite 33

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

Seite 34 - Chapter 334

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

Seite 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

Seite 36 - or collapse

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

Seite 37

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

Seite 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

Seite 39

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

Seite 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

Seite 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

Seite 42 - The Dreamweaver DOM

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

Seite 43

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

Seite 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

Seite 45

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

Seite 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

Seite 47

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

Seite 48 - The site object

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

Seite 49

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

Seite 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

Seite 51 - CHAPTER 5

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

Seite 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

Seite 53

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

Seite 54 - Insert bar tag attributes

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

Seite 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

Seite 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

Seite 57 - The Objects API

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

Seite 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

Seite 59

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

Seite 60 - Chapter 560

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

Seite 61 - Commands

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

Seite 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

Seite 63

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

Seite 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

Seite 65 - function is not defined

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

Seite 66 - Chapter 666

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

Seite 67 - Menu Commands

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

Seite 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

Seite 69

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

Seite 70

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

Seite 71

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

Seite 72 - Chapter 772

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

Seite 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

Seite 74 - Chapter 774

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

Seite 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

Seite 76 - Chapter 776

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

Seite 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

Seite 78 - Chapter 878

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

Seite 79 - The toolbar definition file

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

Seite 80 - Attributes

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

Seite 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.

Seite 82

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

Seite 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

Seite 84

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

Seite 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

Seite 86

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

Seite 87

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

Seite 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

Seite 89

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

Seite 90

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

Seite 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

Seite 92 - • Clicks a button

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

Seite 93 - The Toolbar Command API

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

Seite 94

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

Seite 95

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

Seite 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

Seite 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

Seite 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

Seite 99

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

Seite 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

Seite 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

Seite 102 - Chapter 8102

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

Seite 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

Seite 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

Seite 105

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

Seite 106

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

Seite 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

Seite 108 - Chapter 10108

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

Seite 109 - Tag Libraries and Editors 109

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

Seite 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

Seite 112 - Chapter 10112

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

Seite 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

Seite 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

Seite 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

Seite 116 - Chapter 10116

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

Seite 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

Seite 118

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

Seite 119 - Property Inspectors

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

Seite 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

Seite 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

Seite 122 - Arguments

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

Seite 123 - Property Inspectors 123

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

Seite 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

Seite 125 - Floating Panels

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

Seite 126 - The Floating panel API

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

Seite 127

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

Seite 128

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

Seite 129

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

Seite 130

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

Seite 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

Seite 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

Seite 134 - Chapter 12134

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

Seite 135 - Behaviors

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

Seite 136 - The Behaviors API

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

Seite 137

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

Seite 138 - Chapter 13138

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

Seite 139

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

Seite 141 - Behaviors 141

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

Seite 142

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

Seite 143 - Behaviors 143

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

Seite 144 - Chapter 13144

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

Seite 145 - Server Behaviors

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

Seite 146 - Dreamweaver architecture

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

Seite 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

Seite 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

Seite 149 - Server Behaviors 149

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

Seite 150 - Chapter 14150

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

Seite 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,

Seite 152

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

Seite 153

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

Seite 154

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

Seite 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

Seite 156

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

Seite 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

Seite 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

Seite 159 - Server Behaviors 159

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

Seite 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

Seite 161

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

Seite 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

Seite 163

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

Seite 164

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

Seite 165 - Participant EDML files

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

Seite 166

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

Seite 167 - Required

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

Seite 168

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

Seite 169

Chapter 20250

Seite 170

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

Seite 171

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

Seite 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

Seite 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

Seite 174

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

Seite 175

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

Seite 176

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

Seite 177

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

Seite 178

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 183 - Server behavior techniques

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

Seite 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

Seite 185 - Server Behaviors 185

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

Seite 186 - Chapter 14186

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 195 - DataSourceClass.js

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

Seite 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

Seite 197 - Data Sources 197

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

Seite 198 - Chapter 15198

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

Seite 199 - Server Formats

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

Seite 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

Seite 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

Seite 203

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

Seite 204

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

Seite 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

Seite 206 - Chapter 17206

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

Seite 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

Seite 208

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

Seite 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

Seite 210 - Description:

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

Seite 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

Seite 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

Seite 213

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

Seite 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

Seite 215 - Components 215

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

Seite 216 - Chapter 17216

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

Seite 217 - Server Models

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

Seite 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

Seite 219

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

Seite 220

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

Seite 221

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

Seite 222

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

Seite 223 - • ADODB version 2.1

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

Seite 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

Seite 225 - Data Translators

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

Seite 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

Seite 227 - Data Translators 227

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

Seite 228

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

Seite 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

Seite 230 - Chapter 19230

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

Seite 232 - Chapter 19232

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

Seite 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

Seite 234 - Chapter 19234

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

Seite 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

Seite 236 - Chapter 19236

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

Seite 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

Seite 238 - Chapter 19238

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

Seite 239 - Data Translators 239

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

Seite 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

Seite 241 - Data Translators 241

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

Seite 242 - Chapter 19242

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

Seite 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

Seite 244 - Chapter 20244

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

Seite 245

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

Seite 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

Seite 247 - BODY tag

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

Seite 248 - , bisInFuncton

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

Seite 249

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

Seite 250 - Chapter 20250

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

Seite 251 - C-Level Extensibility

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

Seite 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

Seite 253 - Data Types

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

Seite 254

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

Seite 255

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

Seite 256

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

Seite 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

Seite 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

Seite 259

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

Seite 260 - Chapter 21260

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

Seite 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(

Seite 262

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

Seite 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

Seite 264

Chapter 27336

Seite 265

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

Seite 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

Seite 267

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

Seite 268 - Chapter 21268

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

Seite 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

Seite 270

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

Seite 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

Seite 272

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

Seite 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

Seite 274

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

Seite 275

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

Seite 276

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

Seite 277

Chapter 29348

Seite 278 - Visible (overrides H)

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

Seite 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

Seite 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

Seite 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

Seite 282

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 287 - The Design Notes API

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

Seite 288

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

Seite 289

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

Seite 290

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

Seite 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

Seite 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

Seite 293

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

Seite 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

Seite 295 - The Design Notes API 295

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

Seite 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

Seite 297

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

Seite 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

Seite 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

Seite 300

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

Seite 301

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

Seite 303

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

Seite 304 - Chapter 25304

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

Seite 305

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

Seite 306 - Chapter 25306

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

Seite 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

Seite 308 - Chapter 26308

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

Seite 309

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

Seite 310 - Chapter 26310

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

Seite 311 - The Database API

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

Seite 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

Seite 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

Seite 314

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

Seite 315

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

Seite 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

Seite 317

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

Seite 318

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

Seite 319

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

Seite 320

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

Seite 321

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

Seite 322

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

Seite 323

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

Seite 324 - Chapter 27324

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

Seite 325

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

Seite 326

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

Seite 327

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

Seite 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

Seite 329

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

Seite 330

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

Seite 331

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

Seite 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,

Seite 333

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

Seite 334

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

Seite 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

Seite 336 - Chapter 27336

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

Seite 337 - The Database Connectivity API

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

Seite 338 - The Connection API

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

Seite 339 - Argument

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

Seite 340 - Chapter 28340

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

Seite 341 - The generated include file

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

Seite 342 - ColdFusion

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

Seite 343

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

Seite 344 - Chapter 28344

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

Seite 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

Seite 346

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

Seite 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

Seite 348 - Chapter 29348

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

Seite 349 - CHAPTER 30

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

Seite 350 - Chapter 30350

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

Seite 351

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

Seite 352

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

Seite 353

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

Seite 354

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

Seite 355

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

Seite 356

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

Seite 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

Seite 358

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

Seite 359

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

Seite 360

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

Seite 361

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

Seite 362

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

Seite 363

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

Seite 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

Seite 365

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

Seite 366

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

Seite 367

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

Seite 368 - *connectionData

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

Seite 369 - JavaScript API

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

Seite 370

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

Seite 371 - CHAPTER 31

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

Seite 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

Seite 373

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

Seite 374

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

Seite 375

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

Seite 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

Seite 377

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

Seite 378

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

Seite 379

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

Seite 380

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

Seite 381

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

Seite 382

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

Seite 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()

Seite 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

Seite 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

Seite 386

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

Seite 387

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

Seite 388 - Clipboard functions

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

Seite 389 - &lt; and &gt;

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

Seite 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

Seite 391

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

Seite 392 - • Code Hints menus

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

Seite 393

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

Seite 394

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

Seite 395

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

Seite 396

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

Seite 397

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

Seite 398

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

Seite 399

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

Seite 400 - Command functions

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

Seite 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

Seite 402 - Conversion functions

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

Seite 403 - CSS Styles functions

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

Seite 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

Seite 405

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

Seite 406

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

Seite 407

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

Seite 408 - Data source functions

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

Seite 409 - Enablers

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

Seite 410

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

Seite 411

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

Seite 412

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

Seite 413

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

Seite 414

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

Seite 415

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

Seite 416

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

Seite 417

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

Seite 418

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

Seite 419

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

Seite 420

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

Seite 421

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

Seite 422

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

Seite 423

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

Seite 424

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

Seite 425

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

Seite 426

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

Seite 427

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

Seite 428

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

Seite 429

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

Seite 430

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

Seite 431

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

Seite 432

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

Seite 433

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

Seite 434

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

Seite 435

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

Seite 436

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

Seite 437

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

Seite 438

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

Seite 439

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

Seite 440

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

Seite 441

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

Seite 442 - • "Fireworks 3"

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

Seite 443

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

Seite 444 - • Help book

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

Seite 445

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

Seite 447

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

Seite 448

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

Seite 449

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

Seite 450

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

Seite 451

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

Seite 452 - {filePath}

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

Seite 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

Seite 454

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

Seite 455

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

Seite 456

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

Seite 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

Seite 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

Seite 459

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

Seite 460 - Find/replace functions

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

Seite 461

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

Seite 462

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

Seite 463

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

Seite 464 - • "main_content"

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

Seite 465

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

Seite 466 - General editing functions

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

Seite 467

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

Seite 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

Seite 469

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

Seite 470

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

Seite 471

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

Seite 472

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

Seite 473

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

Seite 474

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

Seite 475

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

Seite 476

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

Seite 477

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

Seite 478

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

Seite 479

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

Seite 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

Seite 481

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

Seite 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

Seite 483 - Global document functions

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

Seite 484

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

Seite 485

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

Seite 486

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

Seite 487 - History functions

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

Seite 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

Seite 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

Seite 490

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

Seite 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

Seite 492

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

Seite 493

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

Seite 494

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

Seite 495 - HTML style functions

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

Seite 496

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

Seite 497

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

Seite 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

Seite 499

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

Seite 500

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

Seite 501

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

Seite 502 - Keyboard functions

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

Seite 503

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

Seite 504

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

Seite 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

Seite 506

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

Seite 507

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

Seite 508

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

Seite 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

Seite 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

Seite 511 - • "px"

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

Seite 512

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

Seite 513

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

Seite 514

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

Seite 515

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

Seite 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

Seite 517

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

Seite 518

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

Seite 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

Seite 520

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

Seite 521

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

Seite 522

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

Seite 523

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

Seite 524

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

Seite 525

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

Seite 526 - Live data functions

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

Seite 527 - Name Samuel

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

Seite 528

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

Seite 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

Seite 530 - Menu functions

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

Seite 531

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

Seite 532 - Path functions

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

Seite 533

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

Seite 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

Seite 535

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

Seite 536 - Report Functions

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

Seite 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

Seite 538 - ; specify null if not used

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

Seite 539

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

Seite 540

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

Seite 541

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

Seite 542

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

Seite 543

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

Seite 544

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

Seite 545 - Nothing

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

Seite 546 - Selection functions

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

Seite 547

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

Seite 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

Seite 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

Seite 550

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

Seite 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

Seite 552 - Server model functions

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

Seite 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

Seite 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

Seite 555

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

Seite 556

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

Seite 557

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

Seite 558

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

Seite 559

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

Seite 560

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

Seite 561

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

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

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

Seite 563

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

Seite 564

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

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

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

Seite 566 - • source_control

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

Seite 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

Seite 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

Seite 569

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

Seite 570

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

Seite 571

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

Seite 572

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

Seite 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

Seite 574

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

Seite 575

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

Seite 576

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

Seite 577

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

Seite 578

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

Seite 579

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

Seite 580

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

Seite 581

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

Seite 582

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

Seite 583

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

Seite 584

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

Seite 585

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

Seite 586

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

Seite 587

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

Seite 588 - , endOffset

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

Seite 589

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

Seite 590

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

Seite 591

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

Seite 592

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

Seite 593

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

Seite 594

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

Seite 595 - , string

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

Seite 596

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

Seite 597

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

Seite 598

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

Seite 599

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

Seite 600

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

Seite 601

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

Seite 602 - Table editing functions

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

Seite 603

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

Seite 604

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

Seite 605

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

Seite 606

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

Seite 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

Seite 608

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 613

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

Seite 614 - Timeline functions

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

Seite 616

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

Seite 617

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

Seite 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 &

Seite 619

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

Seite 620 - Toggle functions

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

Seite 621

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

Seite 622

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

Seite 623

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

Seite 624

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

Seite 625

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

Seite 626

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

Seite 627

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

Seite 628

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

Seite 629

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

Seite 630

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

Seite 631

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

Seite 632

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

Seite 633

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

Seite 634

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

Seite 635

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

Seite 636

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

Seite 637 - Toolbar functions

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

Seite 638

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

Seite 639

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

Seite 640 - Translation functions

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

Seite 641

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

Seite 642 - Window functions

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

Seite 643

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

Seite 644

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

Seite 645

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

Seite 646

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

Seite 647

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

Seite 648

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

Seite 649

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

Seite 650

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

Seite 651

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

Seite 652

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

Seite 653 - APPENDIX A

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

Seite 654

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

Seite 655

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

Seite 656

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

Seite 657

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

Seite 658

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

Seite 659

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

Seite 660

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

Seite 661

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

Seite 662 - Index662

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

Seite 663 - Index 663

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

Seite 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

Seite 665 - Index 665

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

Seite 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

Seite 667 - Index 667

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

Seite 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

Seite 669 - Index 669

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

Seite 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

Seite 671 - Index 671

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

Seite 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

Seite 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

Seite 674 - Index674

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

Seite 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

Seite 676 - Index676

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

Seite 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

Seite 678 - Index678

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

Seite 679 - Index 679

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

Seite 680 - Index680

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

Seite 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

Seite 682 - Index682

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

Seite 683 - Index 683

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 689 - Index 689

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

Seite 690 - Index690

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

Seite 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

Seite 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

Kommentare zu diesen Handbüchern

Keine Kommentare