MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Dokumentacja

Przeglądaj online lub pobierz Dokumentacja dla Oprogramowanie MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API. MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Specifications Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 692
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 0
macromedia
®
Extending Dreamweaver MX
Przeglądanie stron 0
1 2 3 4 5 6 ... 691 692

Podsumowanie treści

Strona 1 - Extending Dreamweaver MX

macromedia™®Extending Dreamweaver MX

Strona 3 - CONTENTS

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

Strona 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

Strona 5

Chapter 8102

Strona 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

Strona 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

Strona 8 - Contents8

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

Strona 9 - Overview

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

Strona 10

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

Strona 11 - Introduction

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

Strona 12 - Chapter 112

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

Strona 13 - Results windows

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

Strona 14

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

Strona 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

Strona 16 - Flash Integration

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

Strona 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

Strona 18 - Chapter 218

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

Strona 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

Strona 20

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 26 - Chapter 226

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

Strona 27 - Extending Dreamweaver MX 27

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

Strona 28 - Chapter 228

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

Strona 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

Strona 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

Strona 31 - CHAPTER 3

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

Strona 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

Strona 33

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

Strona 34 - Chapter 334

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

Strona 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

Strona 36 - or collapse

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

Strona 37

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

Strona 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

Strona 39

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

Strona 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

Strona 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

Strona 42 - The Dreamweaver DOM

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

Strona 43

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

Strona 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

Strona 45

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

Strona 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

Strona 47

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

Strona 48 - The site object

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

Strona 49

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

Strona 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

Strona 51 - CHAPTER 5

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

Strona 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

Strona 53

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

Strona 54 - Insert bar tag attributes

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

Strona 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

Strona 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

Strona 57 - The Objects API

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

Strona 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

Strona 59

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

Strona 60 - Chapter 560

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

Strona 61 - Commands

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

Strona 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

Strona 63

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

Strona 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

Strona 65 - function is not defined

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

Strona 66 - Chapter 666

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

Strona 67 - Menu Commands

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

Strona 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

Strona 69

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

Strona 70

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

Strona 71

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

Strona 72 - Chapter 772

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

Strona 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

Strona 74 - Chapter 774

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

Strona 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

Strona 76 - Chapter 776

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

Strona 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

Strona 78 - Chapter 878

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

Strona 79 - The toolbar definition file

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

Strona 80 - Attributes

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

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

Strona 82

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

Strona 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

Strona 84

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

Strona 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

Strona 86

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

Strona 87

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

Strona 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

Strona 89

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

Strona 90

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

Strona 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

Strona 92 - • Clicks a button

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

Strona 93 - The Toolbar Command API

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

Strona 94

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

Strona 95

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

Strona 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

Strona 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

Strona 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

Strona 99

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

Strona 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

Strona 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

Strona 102 - Chapter 8102

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

Strona 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

Strona 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

Strona 105

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

Strona 106

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

Strona 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

Strona 108 - Chapter 10108

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

Strona 109 - Tag Libraries and Editors 109

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

Strona 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

Strona 112 - Chapter 10112

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

Strona 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

Strona 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

Strona 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

Strona 116 - Chapter 10116

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

Strona 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

Strona 118

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

Strona 119 - Property Inspectors

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

Strona 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

Strona 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

Strona 122 - Arguments

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

Strona 123 - Property Inspectors 123

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

Strona 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

Strona 125 - Floating Panels

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

Strona 126 - The Floating panel API

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

Strona 127

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

Strona 128

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

Strona 129

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

Strona 130

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

Strona 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

Strona 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

Strona 134 - Chapter 12134

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

Strona 135 - Behaviors

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

Strona 136 - The Behaviors API

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

Strona 137

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

Strona 138 - Chapter 13138

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

Strona 139

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

Strona 141 - Behaviors 141

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

Strona 142

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

Strona 143 - Behaviors 143

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

Strona 144 - Chapter 13144

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

Strona 145 - Server Behaviors

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

Strona 146 - Dreamweaver architecture

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

Strona 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

Strona 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

Strona 149 - Server Behaviors 149

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

Strona 150 - Chapter 14150

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

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

Strona 152

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

Strona 153

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

Strona 154

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

Strona 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

Strona 156

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

Strona 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

Strona 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

Strona 159 - Server Behaviors 159

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

Strona 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

Strona 161

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

Strona 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

Strona 163

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

Strona 164

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

Strona 165 - Participant EDML files

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

Strona 166

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

Strona 167 - Required

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

Strona 168

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

Strona 169

Chapter 20250

Strona 170

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

Strona 171

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

Strona 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

Strona 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

Strona 174

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

Strona 175

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

Strona 176

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

Strona 177

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

Strona 178

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 183 - Server behavior techniques

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

Strona 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

Strona 185 - Server Behaviors 185

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

Strona 186 - Chapter 14186

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 195 - DataSourceClass.js

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

Strona 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

Strona 197 - Data Sources 197

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

Strona 198 - Chapter 15198

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

Strona 199 - Server Formats

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

Strona 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

Strona 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

Strona 203

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

Strona 204

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

Strona 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

Strona 206 - Chapter 17206

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

Strona 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

Strona 208

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

Strona 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

Strona 210 - Description:

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

Strona 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

Strona 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

Strona 213

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

Strona 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

Strona 215 - Components 215

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

Strona 216 - Chapter 17216

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

Strona 217 - Server Models

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

Strona 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

Strona 219

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

Strona 220

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

Strona 221

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

Strona 222

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

Strona 223 - • ADODB version 2.1

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

Strona 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

Strona 225 - Data Translators

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

Strona 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

Strona 227 - Data Translators 227

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

Strona 228

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

Strona 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

Strona 230 - Chapter 19230

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

Strona 232 - Chapter 19232

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

Strona 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

Strona 234 - Chapter 19234

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

Strona 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

Strona 236 - Chapter 19236

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

Strona 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

Strona 238 - Chapter 19238

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

Strona 239 - Data Translators 239

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

Strona 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

Strona 241 - Data Translators 241

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

Strona 242 - Chapter 19242

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

Strona 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

Strona 244 - Chapter 20244

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

Strona 245

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

Strona 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

Strona 247 - BODY tag

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

Strona 248 - , bisInFuncton

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

Strona 249

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

Strona 250 - Chapter 20250

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

Strona 251 - C-Level Extensibility

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

Strona 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

Strona 253 - Data Types

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

Strona 254

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

Strona 255

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

Strona 256

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

Strona 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

Strona 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

Strona 259

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

Strona 260 - Chapter 21260

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

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

Strona 262

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

Strona 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

Strona 264

Chapter 27336

Strona 265

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

Strona 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

Strona 267

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

Strona 268 - Chapter 21268

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

Strona 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

Strona 270

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

Strona 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

Strona 272

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

Strona 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

Strona 274

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

Strona 275

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

Strona 276

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

Strona 277

Chapter 29348

Strona 278 - Visible (overrides H)

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

Strona 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

Strona 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

Strona 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

Strona 282

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 287 - The Design Notes API

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

Strona 288

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

Strona 289

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

Strona 290

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

Strona 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

Strona 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

Strona 293

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

Strona 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

Strona 295 - The Design Notes API 295

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

Strona 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

Strona 297

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

Strona 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

Strona 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

Strona 300

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

Strona 301

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

Strona 303

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

Strona 304 - Chapter 25304

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

Strona 305

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

Strona 306 - Chapter 25306

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

Strona 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

Strona 308 - Chapter 26308

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

Strona 309

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

Strona 310 - Chapter 26310

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

Strona 311 - The Database API

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

Strona 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

Strona 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

Strona 314

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

Strona 315

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

Strona 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

Strona 317

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

Strona 318

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

Strona 319

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

Strona 320

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

Strona 321

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

Strona 322

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

Strona 323

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

Strona 324 - Chapter 27324

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

Strona 325

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

Strona 326

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

Strona 327

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

Strona 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

Strona 329

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

Strona 330

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

Strona 331

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

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

Strona 333

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

Strona 334

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

Strona 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

Strona 336 - Chapter 27336

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

Strona 337 - The Database Connectivity API

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

Strona 338 - The Connection API

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

Strona 339 - Argument

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

Strona 340 - Chapter 28340

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

Strona 341 - The generated include file

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

Strona 342 - ColdFusion

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

Strona 343

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

Strona 344 - Chapter 28344

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

Strona 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

Strona 346

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

Strona 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

Strona 348 - Chapter 29348

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

Strona 349 - CHAPTER 30

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

Strona 350 - Chapter 30350

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

Strona 351

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

Strona 352

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

Strona 353

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

Strona 354

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

Strona 355

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

Strona 356

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

Strona 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

Strona 358

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

Strona 359

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

Strona 360

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

Strona 361

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

Strona 362

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

Strona 363

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

Strona 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

Strona 365

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

Strona 366

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

Strona 367

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

Strona 368 - *connectionData

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

Strona 369 - JavaScript API

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

Strona 370

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

Strona 371 - CHAPTER 31

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

Strona 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

Strona 373

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

Strona 374

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

Strona 375

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

Strona 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

Strona 377

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

Strona 378

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

Strona 379

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

Strona 380

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

Strona 381

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

Strona 382

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

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

Strona 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

Strona 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

Strona 386

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

Strona 387

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

Strona 388 - Clipboard functions

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

Strona 389 - &lt; and &gt;

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

Strona 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

Strona 391

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

Strona 392 - • Code Hints menus

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

Strona 393

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

Strona 394

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

Strona 395

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

Strona 396

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

Strona 397

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

Strona 398

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

Strona 399

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

Strona 400 - Command functions

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

Strona 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

Strona 402 - Conversion functions

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

Strona 403 - CSS Styles functions

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

Strona 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

Strona 405

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

Strona 406

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

Strona 407

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

Strona 408 - Data source functions

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

Strona 409 - Enablers

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

Strona 410

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

Strona 411

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

Strona 412

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

Strona 413

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

Strona 414

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

Strona 415

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

Strona 416

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

Strona 417

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

Strona 418

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

Strona 419

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

Strona 420

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

Strona 421

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

Strona 422

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

Strona 423

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

Strona 424

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

Strona 425

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

Strona 426

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

Strona 427

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

Strona 428

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

Strona 429

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

Strona 430

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

Strona 431

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

Strona 432

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

Strona 433

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

Strona 434

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

Strona 435

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

Strona 436

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

Strona 437

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

Strona 438

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

Strona 439

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

Strona 440

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

Strona 441

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

Strona 442 - • "Fireworks 3"

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

Strona 443

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

Strona 444 - • Help book

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

Strona 445

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

Strona 447

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

Strona 448

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

Strona 449

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

Strona 450

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

Strona 451

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

Strona 452 - {filePath}

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

Strona 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

Strona 454

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

Strona 455

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

Strona 456

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

Strona 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

Strona 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

Strona 459

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

Strona 460 - Find/replace functions

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

Strona 461

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

Strona 462

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

Strona 463

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

Strona 464 - • "main_content"

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

Strona 465

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

Strona 466 - General editing functions

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

Strona 467

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

Strona 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

Strona 469

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

Strona 470

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

Strona 471

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

Strona 472

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

Strona 473

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

Strona 474

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

Strona 475

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

Strona 476

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

Strona 477

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

Strona 478

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

Strona 479

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

Strona 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

Strona 481

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

Strona 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

Strona 483 - Global document functions

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

Strona 484

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

Strona 485

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

Strona 486

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

Strona 487 - History functions

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

Strona 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

Strona 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

Strona 490

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

Strona 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

Strona 492

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

Strona 493

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

Strona 494

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

Strona 495 - HTML style functions

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

Strona 496

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

Strona 497

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

Strona 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

Strona 499

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

Strona 500

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

Strona 501

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

Strona 502 - Keyboard functions

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

Strona 503

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

Strona 504

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

Strona 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

Strona 506

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

Strona 507

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

Strona 508

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

Strona 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

Strona 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

Strona 511 - • "px"

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

Strona 512

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

Strona 513

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

Strona 514

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

Strona 515

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

Strona 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

Strona 517

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

Strona 518

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

Strona 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

Strona 520

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

Strona 521

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

Strona 522

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

Strona 523

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

Strona 524

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

Strona 525

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

Strona 526 - Live data functions

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

Strona 527 - Name Samuel

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

Strona 528

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

Strona 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

Strona 530 - Menu functions

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

Strona 531

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

Strona 532 - Path functions

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

Strona 533

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

Strona 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

Strona 535

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

Strona 536 - Report Functions

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

Strona 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

Strona 538 - ; specify null if not used

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

Strona 539

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

Strona 540

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

Strona 541

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

Strona 542

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

Strona 543

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

Strona 544

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

Strona 545 - Nothing

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

Strona 546 - Selection functions

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

Strona 547

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

Strona 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

Strona 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

Strona 550

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

Strona 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

Strona 552 - Server model functions

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

Strona 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

Strona 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

Strona 555

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

Strona 556

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

Strona 557

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

Strona 558

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

Strona 559

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

Strona 560

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

Strona 561

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

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

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

Strona 563

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

Strona 564

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

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

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

Strona 566 - • source_control

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

Strona 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

Strona 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

Strona 569

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

Strona 570

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

Strona 571

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

Strona 572

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

Strona 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

Strona 574

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

Strona 575

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

Strona 576

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

Strona 577

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

Strona 578

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

Strona 579

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

Strona 580

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

Strona 581

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

Strona 582

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

Strona 583

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

Strona 584

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

Strona 585

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

Strona 586

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

Strona 587

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

Strona 588 - , endOffset

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

Strona 589

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

Strona 590

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

Strona 591

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

Strona 592

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

Strona 593

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

Strona 594

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

Strona 595 - , string

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

Strona 596

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

Strona 597

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

Strona 598

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

Strona 599

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

Strona 600

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

Strona 601

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

Strona 602 - Table editing functions

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

Strona 603

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

Strona 604

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

Strona 605

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

Strona 606

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

Strona 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

Strona 608

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 613

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

Strona 614 - Timeline functions

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

Strona 616

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

Strona 617

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

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

Strona 619

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

Strona 620 - Toggle functions

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

Strona 621

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

Strona 622

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

Strona 623

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

Strona 624

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

Strona 625

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

Strona 626

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

Strona 627

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

Strona 628

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

Strona 629

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

Strona 630

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

Strona 631

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

Strona 632

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

Strona 633

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

Strona 634

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

Strona 635

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

Strona 636

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

Strona 637 - Toolbar functions

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

Strona 638

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

Strona 639

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

Strona 640 - Translation functions

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

Strona 641

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

Strona 642 - Window functions

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

Strona 643

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

Strona 644

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

Strona 645

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

Strona 646

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

Strona 647

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

Strona 648

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

Strona 649

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

Strona 650

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

Strona 651

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

Strona 652

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

Strona 653 - APPENDIX A

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

Strona 654

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

Strona 655

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

Strona 656

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

Strona 657

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

Strona 658

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

Strona 659

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

Strona 660

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

Strona 661

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

Strona 662 - Index662

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

Strona 663 - Index 663

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

Strona 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

Strona 665 - Index 665

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

Strona 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

Strona 667 - Index 667

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

Strona 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

Strona 669 - Index 669

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

Strona 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

Strona 671 - Index 671

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

Strona 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

Strona 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

Strona 674 - Index674

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

Strona 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

Strona 676 - Index676

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

Strona 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

Strona 678 - Index678

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

Strona 679 - Index 679

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

Strona 680 - Index680

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

Strona 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

Strona 682 - Index682

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

Strona 683 - Index 683

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 689 - Index 689

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

Strona 690 - Index690

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

Strona 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

Strona 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

Komentarze do niniejszej Instrukcji

Brak uwag