background image

Dreamweaver API Reference

000_DW_API_Print.book  Page 1  Wednesday, August 20, 2003  9:14 AM

Summary of Contents for DREAMWEAVER MX 2004

Page 1: ...Dreamweaver API Reference...

Page 2: ...cromedia provides these links only as a convenience and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third party sites Third...

Page 3: ...29 Other 29 Documentation changes 29 Errata 30 Conventions used in this guide 30 PART I Utility APIs CHAPTER 2 The File I O API 33 Accessing configuration folders 33 The File I O API 33 DWfile copy 3...

Page 4: ...URLToFilePath 55 MMNotes open 55 MMNotes remove 56 MMNotes set 56 The Design Notes C API 57 void CloseNotesFile 57 BOOL FilePathToLocalURL 57 BOOL GetNote 58 int GetNoteLength 58 int GetNotesKeyCount...

Page 5: ...erUrlTemplateList deprecated 82 MMDB getLocalDsnList 83 MMDB getPassword 83 MMDB getRDSPassword 84 MMDB getRDSUserName 84 MMDB getRemoteDsnList 84 MMDB getRuntimeConnectionType 85 MMDB getUserName 85...

Page 6: ...113 CHAPTER 10 The Source Control Integration API 117 How source control integration with Dreamweaver works 117 Adding source control system functionality 118 The Source Control Integration API requir...

Page 7: ..._AfterGet 137 bool SCS_AfterPut 138 PART II JavaScript API CHAPTER 11 Application 141 External application functions 141 dreamweaver browseDocument 141 dreamweaver getBrowserList 142 dreamweaver getEx...

Page 8: ...tStepsAsJavaScript 159 dreamweaver historyPalette getUndoState 159 dreamweaver historyPalette replaySteps 160 dreamweaver historyPalette saveAsCommand 160 dreamweaver historyPalette setSelectedSteps 1...

Page 9: ...eaver resultsPalette openInBrowser 179 dreamweaver resultsPalette openInEditor 179 dreamweaver resultsPalette save 179 dreamweaver resultsPalette selectAll 180 Server debugging 180 dreamweaver results...

Page 10: ...aver htmlInspector getShowWordWrap 196 dreamweaver htmlInspector setShowAutoIndent 197 dreamweaver htmlInspector setShowInvalidHTML 197 dreamweaver htmlInspector setShowLineNumbers 197 dreamweaver htm...

Page 11: ...ties 216 dreamweaver tileHorizontally 216 dreamweaver tileVertically 216 dreamweaver toggleFloater 217 dreamweaver updateReference 217 CHAPTER 13 Site 219 Report functions 219 dreamweaver isReporting...

Page 12: ...makeEditable 236 site makeNewDreamweaverFile 236 site makeNewFolder 237 site newHomePage 237 site newSite 237 site open 238 site put 238 site recreateCache 239 site refresh 239 site remoteIsValid 239...

Page 13: ...L 258 dreamweaver getDocumentDOM 259 dreamweaver getNewDocumentDOM 260 dreamweaver getRecentFileList 260 dreamweaver importXMLIntoTemplate 260 dreamweaver newDocument 261 dreamweaver newFromTemplate 2...

Page 14: ...offsetsToNode deprecated 284 dreamweaver selectAll 285 dreamweaver setSelection deprecated 285 String manipulation functions 286 dreamweaver doURLEncoding 286 dreamweaver getTokens 286 dreamweaver lat...

Page 15: ...dreamweaver templatePalette getSelectedTemplate deprecated 302 dreamweaver templatePalette renameSelectedTemplate deprecated 303 Behavior functions 303 dom addBehavior 303 dom getBehavior 304 dom reap...

Page 16: ...electedNode 327 dreamweaver serverComponents refresh 328 Data source functions 328 dreamweaver dbi getDataSources 328 Extension Data Manager functions 329 dreamweaver getExtDataValue 329 dreamweaver g...

Page 17: ...lePalette duplicateSelectedStyle 348 dreamweaver cssStylePalette editSelectedStyle 349 dreamweaver cssStylePalette editStyleSheet 349 dreamweaver cssStylePalette getMediaType 350 dreamweaver cssStyleP...

Page 18: ...removeSpacerFromColumn 367 dom setColumnAutostretch 367 dom setShowLayoutTableTabs 368 dom setShowLayoutView 368 Table editing functions 369 dom convertWidthsToPercent 369 dom convertWidthsToPixels 3...

Page 19: ...neral editing functions 389 dom applyCharacterMarkup 389 dom applyFontMarkup 389 dom deleteSelection 390 dom editAttribute 390 dom exitBlock 390 dom getCharSet 391 dom getFontMarkup 391 dom getLineFro...

Page 20: ...08 dom getShowNoscript 409 dom getAutoValidationCount 409 dom isDesignviewUpdated 410 dom isSelectionValid 410 dom setShowNoscript 410 dom source arrowDown 411 dom source arrowLeft 411 dom source arro...

Page 21: ...rary 427 dreamweaver tagLibrary getSelectedTag 427 dreamweaver tagLibrary importDTDOrSchema 428 dreamweaver tagLibrary getImportedTagList 428 CHAPTER 19 Enablers 431 Enablers 431 dom canAlign 431 dom...

Page 22: ...r canSaveFramesetAs 448 dreamweaver canSelectAll 448 dreamweaver canShowFindDialog 448 dreamweaver canUndo 449 dreamweaver cssRuleTracker canEditSelectedRule 449 dreamweaver cssStylePalette canApplySe...

Page 23: ...anMakeEditable 459 site canMakeNewFileOrFolder 459 site canOpen 460 site canPut 460 site canRecreateCache 460 site canRefresh 461 site canRemoveLink 461 site canSetLayout 461 site canSelectAllCheckedO...

Page 24: ...24 Contents...

Page 25: ...the Flash Objects API which lets you build objects that create Macromedia Flash content The Database API which lets you access information stored in databases and manage database connections The Datab...

Page 26: ...er also explains how to customize Dreamweaver by editing and adding tags to various HTML and XML files to add menu items or document types and so on Additional resources for extension writers To commu...

Page 27: ...cssStylePalette getMediaType on page 350 dreamweaver cssStylePalette setMediaType on page 352 Table editing dom getShowTableWidths on page 371 dom removeColumnWidth on page 375 dom setShowTableWidths...

Page 28: ...eBehavior dreamweaver timelineInspector removeFrame dreamweaver timelineInspector removeKeyframe dreamweaver timelineInspector removeObject dreamweaver timelineInspector removeTimeline dreamweaver tim...

Page 29: ...mweaver timelineInspector canAddFrame dreamweaver timelineInspector canAddKeyFrame dreamweaver timelineInspector canChangeObject dreamweaver timelineInspector canRemoveBehavior dreamweaver timelineIns...

Page 30: ...on name Enabler functions chapter The Enabler functions have been organized into their own chapter with cross references to their relevant API functions Errata A current list of known issues can be fo...

Page 31: ...ate new database connection types access JavaBeans fscomponents and integrate Dreamweaver with various source control systems Chapter 2 The File I O API 33 Chapter 3 The HTTP API 43 Chapter 4 The Desi...

Page 32: ......

Page 33: ...ndows XP and Mac OS X platforms users have their own copies of configuration files Whenever Dreamweaver writes to a configuration file Dreamweaver writes it to the user s Configuration folder Similarl...

Page 34: ...ile c Config myconfig cfg var newURL file c Config myconfig_backup cfg DWfile copy fileURL newURL DWfile createFolder Availability Dreamweaver 2 Description This function creates a folder at the speci...

Page 35: ...e c temp mydata txt if DWfile exists fileURL alert fileURL exists else alert fileURL does not exist DWfile getAttributes Availability Dreamweaver 2 Description This function gets the attributes of the...

Page 36: ...ts that have elapsed since some base time The exact meaning of time units and base time is platform dependent in Windows for example a time unit is 100ns and the base time is January 1st 1600 Example...

Page 37: ...n call this function and the DWfile getModificationDate function on a file to compare the modification date to the creation date var file1 file c temp file1 txt var time1 DWfile getCreationDate file1...

Page 38: ...fication Returns A JavaScript Date object that represents the date and time when the specified file was last modified DWfile getSize Availability Dreamweaver MX Description This function gets the size...

Page 39: ...ts a list of all the text TXT files in the C temp folder and displays the list in an alert message var folderURL file c temp var fileMask txt var list DWfile listFolder folderURL fileMask files if lis...

Page 40: ...operation succeeds false otherwise Example The following example uses the DWfile getAttributes function to determine whether the file is read only and the confirm function to display a Yes No dialog...

Page 41: ...ng are R W H V RH RV WH or WV You should not use R and W together because they are mutually exclusive If you combine them R becomes meaningless and the file is set as writable W You should not use H a...

Page 42: ...d the contents of the file are overwritten by the string Returns A Boolean value true if the string is successfully written to the file false otherwise Example The following code attempts to write the...

Page 43: ...ode and data The statusCode property indicates the status of the operation possible values include but are not limited to the following values 200 Status OK 400 Unintelligible request 404 Requested UR...

Page 44: ...lative to the Configuration folder on the application server from which you want to retrieve and clear server scripts Returns An object that represents the reply from the server The data property of t...

Page 45: ...xample if the specified file is at www dreamcentral com people index html Dreamweaver stores the index html file in the People folder inside the www dreamcentral com folder Arguments URL prompt saveUR...

Page 46: ...error codes if the operation is not successful 1 Unspecified error 2 File not found 3 Invalid path 4 Number of open files limit reached 5 Access denied 6 Invalid file handle 7 Cannot remove current w...

Page 47: ...of false is ignored for security reasons The saveURL argument which is optional is the location on the user s hard disk where the file should be saved which is expressed as a file URL If prompt is a...

Page 48: ...argument is an absolute URL on a web server if http is omitted from the URL Dreamweaver assumes HTTP protocol The serverScriptsFolder argument is an optional string that names a particular folder rel...

Page 49: ...rg1 Foo application x www form urlencoded Configuration DeployScripts When Dreamweaver executes this function call the following sequence occurs 1 The myScripts cfm file in the Configuration DeployScr...

Page 50: ...posted If omitted this argument defaults to application x www form urlencoded The serverScriptsFolder argument is an optional string It names a particular folder relative to the Configuration folder o...

Page 51: ...ee Using Dreamweaver How Design Notes work Each Design Notes file stores information for a single document If one or more documents in a folder has an associated Design Notes file Dreamweaver creates...

Page 52: ...lways call the MMNotes close function when you finish with Design Notes so Dreamweaver writes to the file Arguments fileHandle The fileHandle argument is the file handle that the MMNotes open function...

Page 53: ...on page 53 MMNotes getKeyCount Description This function gets the number of key value pairs in the specified Design Notes file Arguments fileHandle The fileHandle argument is the file handle that the...

Page 54: ...ontains the path of the Local Root folder for the site which is expressed as a file URL or an empty string if Dreamweaver is not installed or the Design Notes file is outside any site that is defined...

Page 55: ...calURLToFilePath file MacintoshHD images moon gif returns MacintoshHD images moon gif MMNotes open Description This function opens the Design Notes file that is associated with the specified file or c...

Page 56: ...tring The fileHandle argument is the file handle that the MMNotes open function returns The keyName argument is a string that contains the name of the key The valueString argument is a string that con...

Page 57: ...specified Design Notes file and saves any changes If all key value pairs are removed from the Design Note file Dreamweaver deletes it Dreamweaver deletes the _notes folder when the last Design Notes...

Page 58: ...uf argument receives the value of the key Example The following code gets the value of the comments key in the Design Notes file that is associated with the welcome html file FileHandle noteHandle Ope...

Page 59: ...re stored The keyArrayMaxLen argument is the integer that GetNotesKeyCount noteHandle returns indicating the maximum number of items in the key buffer array Returns A Boolean value true indicates the...

Page 60: ...s successful false otherwise The siteRootBuf argument receives the address of the buffer that stores the site root If you specify the infoPrefs argument the function also returns the Design Notes pref...

Page 61: ...ed as a file URL is the path to a local file The drivePathBuf argument is the buffer where the local drive path is stored The drivePathMaxLen argument is the maximum size of the buffer that the driveP...

Page 62: ...ates whether to open the file in read only mode The default value is false You can specify the bReadOnly argument starting in version 2 of the MMNotes dll file BOOL RemoveNote Description This functio...

Page 63: ...al For general information on how C libraries interact with the JavaScript interpreter in Macromedia Dreamweaver MX 2004 see Extending Dreamweaver for details on C level extensibility The FWLaunch API...

Page 64: ...JavaScript or the path to a JavaScript file Returns A cookie object if the JavaScript passes successfully or a nonzero error code that indicates one of the following errors occurred Invalid usage whic...

Page 65: ...hile Fireworks executed the script File I O error which indicates that Fireworks cannot create a Response file because the disk is full Error notifying Dreamweaver that the user is not running a valid...

Page 66: ...ssion is already running FWLaunch optimizeInFireworks Availability Dreamweaver 2 Fireworks 2 Description This function opens a Fireworks optimization session for the specified image Arguments docURL i...

Page 67: ...ch indicates that the function does not open a valid version of Fireworks version 2 or later User cancelled the operation FWLaunch validateFireworks Availability Dreamweaver 2 Fireworks 2 Description...

Page 68: ...0 if isFireworks3 alert You must have Fireworks 3 0 or later to use this command return Tell Fireworks to execute the prompt method gProgressTrackerCookie FWLaunch execJsInFireworks prompt Please ente...

Page 69: ...alert an error occurred else got a valid response This return value might not always be a useful one since not all functions in Fireworks return a string but we know this one does so we can show the...

Page 70: ...70 Chapter 5 Fireworks Integration...

Page 71: ...to change the properties of the element as it is published for more information about working with component properties in Dreamweaver see Using Dreamweaver Inserting Flash elements Flash elements ar...

Page 72: ...so reside on the Insert menu or on other menus in Dreamweaver Use the JavaScript function dom insertFlashElement with the menus xml file format see Menus and Menu Commands in Extending Dreamweaver to...

Page 73: ...first parameter must be dwType Its value should be a string that represents the name of the object type such as Flash Text The swfFileName argument which is expressed as a file URL is the output filen...

Page 74: ...Example The following JavaScript creates a Flash object file of type myType which replaces any occurrences of the string text inside the Template file with the string Hello World It creates a GIF file...

Page 75: ...ot a myType object SWFFile readFile Description This function reads a Flash Object file Arguments fileName The fileName argument which is expressed as a file URL is a path to a Flash Object file Retur...

Page 76: ...76 Chapter 6 Flash Integration...

Page 77: ...ructured query language SQL statements Database API functions are used at design time when users are building web applications not at runtime when the web application is deployed You can use these fun...

Page 78: ...ly they do not access a database For functions that access a database see Database access functions on page 91 MMDB deleteConnection Availability Dreamweaver MX Description This function deletes the n...

Page 79: ...object Arguments name The name argument is a string variable that specifies the name of the connection that you want to reference Returns A reference to a named connection object Connection objects c...

Page 80: ...at corresponds to the specified connection string This function is useful when you need to reselect a connection name in the user interface UI from data on the page If you have a connection string tha...

Page 81: ...nString argument is the connection string that gets the connection name The driverName argument which is optional further qualifies the connString argument Returns A connection name string that corres...

Page 82: ...live data source Returns A string that contains the driver name Example The statement MMDB getDriverName EmpDB might return the following string jdbc oracle driver JdbcOracle MMDB getDriverUrlTemplat...

Page 83: ...B getLocalDsnList Availability Dreamweaver UltraDev 4 Description This function gets ODBC DSNs that are defined on the user s system Arguments None Returns An array that contains the ODBC DSNs that ar...

Page 84: ...ts None Returns A string that contains the RDS user name MMDB getRemoteDsnList Availability Dreamweaver UltraDev 4 enhanced in Dreamweaver MX Description This function gets the ODBC DSNs from the site...

Page 85: ...Availability Dreamweaver UltraDev 1 Description This function returns the runtime connection type of the specified connection name Arguments connName The connName argument is a connection name that i...

Page 86: ...hether a connection of a given name exists Arguments name The name argument is the connection name Returns Returns a Boolean value true indicates that a connection with the specified name exists false...

Page 87: ...n dialog box in edit mode for editing the named connection In this mode the name text field is dimmed If the argument list consists of connRec and the Boolean value bDuplicate the popupConnection func...

Page 88: ...This function sets the RDS password Arguments password The password argument is a string that contains the RDS password Returns Nothing MMDB setRDSUserName Availability Dreamweaver UltraDev 4 Descrip...

Page 89: ...mweaver UltraDev 4 Windows only Description This function displays the System ODBC Administration dialog box or the ODBC Data Source Administrator dialog box Arguments None Returns Nothing The System...

Page 90: ...isplays a modal dialog box that describes the results Arguments serverPropertiesArray This function expects a single argument an array object that contains values from the following list which are app...

Page 91: ...ameArray You can use the MMDB getSPParamsAsString function to get the parameters of the stored procedure If you provide parameter names the values that you specify in paramValuesArray must be in the s...

Page 92: ...atch the SELECT statement or an error if the SQL statement is invalid or the connection cannot be made Example The code var columnArray MMDB getColumnList EmpDB Select from Employees returns the follo...

Page 93: ...ptext typename MMDB getColumnsOfTable Availability Dreamweaver UltraDev 1 Description This function gets a list of all the columns in the specified table Arguments connName tableName The connName argu...

Page 94: ...tableName argument is the name of the table for which you want to retrieve the set of columns that comprises the primary key of that table Returns An array of strings The array contains one string for...

Page 95: ...eamweaver gets at design time You must first create a schema or catalog in your database application before you can apply it in Dreamweaver Consult your database documentation or your system administr...

Page 96: ...n the order in which the stored procedure expects them You can use the MMDB getSPParamsAsString function to get the parameters for the stored procedure Returns An array of strings that represents the...

Page 97: ...e paramNameArray specify the values in the order in which the stored procedure expects them Returns An array of strings that represents the list of columns This function returns an error if the SQL st...

Page 98: ...e argument is a connection name that is specified in the Connection Manager It identifies the connection string that Dreamweaver should use to make a database connection to a live data source The proc...

Page 99: ...specified in the Connection Manager It identifies the connection string that Dreamweaver should use to make a database connection to a live data source Returns An array of objects where each object h...

Page 100: ...isView schema if thisSchema length 0 thisSchema Trim thisView catalog if thisSchema length 0 thisSchema views push String thisSchema thisView view MMDB showResultset Availability Dreamweaver UltraDev...

Page 101: ...ent is a connection name that is specified in the Connection Manager It identifies the connection string that Dreamweaver should use to make a database connection to a live data source The procName ar...

Page 102: ...at is specified in the Connection Manager It identifies the connection string that Dreamweaver should use to make a database connection to a live data source The procName argument is the name of the s...

Page 103: ...HTML file that lays out the user interface UI for your connection dialog box Name this file using the name of the connection for example myConnection htm For information about creating a dialog box s...

Page 104: ...the layout for the connection dialog box on page 103 must include this connection type implementation file Unless you need to define connection parameters other than the ones provided in the standard...

Page 105: ...findConnection returns a connection object Dreamweaver then lists all the connection objects in the Database Explorer panel When the user opens a connection dialog box and selects to create a new con...

Page 106: ...d for the runtime connection designtimeString Design time connection string see string designtimeDsn Design time data source name see dsn designtimeDriver Name of a JDBC driver used at design time des...

Page 107: ...Dreamweaver calls this function when the user clicks OK in the connection dialog box The applyConnection function generates the HTML source for a connection Dreamweaver writes the HTML to the Configu...

Page 108: ...should be named MyConnection1 asp where MyConnection1 is the name of the connection The following sample is an include file for an ADO connection string Filename Connection_ado_conn_string htm Type AD...

Page 109: ...nt as shown in the following example include file Connections MyConnection1 jsp The definition file for your connection type For each server model there is a connection_includefile edml file that defi...

Page 110: ...DesigntimeType w searchPattern searchPattern paramNames http CDATA s HTTP w searchPattern searchPattern paramNames catalog CDATA s Catalog w searchPattern searchPattern paramNames schema CDATA s Schem...

Page 111: ...older Note The function arguments described in this chapter sometimes contain an argument called packageName className which is intended to represent a single value The JavaBeans API The following fun...

Page 112: ...string of the Dreamweaver message from the last error MMJB getEvents Availability Dreamweaver UltraDev 4 enhanced in Dreamweaver MX Description Introspects the JavaBeans class and returns its events...

Page 113: ...n of the JAR or ZIP Java archive that contains className Returns A string array of the indexed properties associated with className an error returns an empty array MMJB getMethods Availability Dreamwe...

Page 114: ...contains className Returns A string array of the properties associated with className an error returns an empty array MMJB getReadProperties Availability Dreamweaver MX Description Gets read only prop...

Page 115: ...he class The class must reside in a JAR or ZIP Java archive If packagePath is omitted the archive must reside in your system classpath or be a class file that is installed in the Configuration Classes...

Page 116: ...116 Chapter 9 The JavaBeans API...

Page 117: ...aver user defines or edits a site and then selects the Web Server SCS tab the choices that correspond to the DLLs that loaded from the Program Files Common Files Macromedia 2004 Source Control folder...

Page 118: ...ts the History menu item Dreamweaver calls the corresponding function passing the selected file s to the DLL The DLL displays the History dialog box so the user can interact with it in the same way as...

Page 119: ...me argument is a string that points to the name of the site The site name can be a maximum of 64 characters Returns A Boolean value true if successful false otherwise bool SCS_Disconnect Description T...

Page 120: ...that passed into Dreamweaver during the Connect call The remotePath is a buffer where the full remote path of the root folder is stored The folderLen argument is an integer that indicates the length o...

Page 121: ...tems The itemList argument is a preallocated list of itemInfo structures The numItems argument is the number of items that are allocated for the itemList returned from GetFolderListLength Returns A Bo...

Page 122: ...otherwise bool SCS_Put Description This function puts a list of local files or folders into the source control system Arguments void connectionData const char localPathList const char remotePathList c...

Page 123: ...or moves a file or folder depending on the values that are specified for oldRemotePath and newRemotePath For example if oldRemotePath equals folder1 file1 and newRemotePath equals folder1 renamefile1...

Page 124: ...has required and optional functions The functions in this section are optional bool SCS_GetConnectionInfo Description This function displays a dialog box to let the user change or set the connection...

Page 125: ...update its persistent information about the site Arguments const char oldSiteName 64 const char newSiteName 64 The oldSiteName argument is a string that points to the original name of the site before...

Page 126: ...ber of items being added by the DLL this value is retrieved from the GetNumNewFeatures call The following function signature defines the functions and enablers that passed to the SCS_GetNewFeatures ca...

Page 127: ...umItems argument is the number of items in each list Returns A Boolean value true if successful false otherwise bool SCS_Checkout Description This function checks out a list of local files or folders...

Page 128: ...heck out The localPathList argument is a mirrored list of local filenames or folder paths The successList argument is a list of Boolean values that are populated by the DLL to let Dreamweaver know whi...

Page 129: ...um length of 64 characters The emailAddressList argument is a list of strings that corresponds to the users e mail addresses Each e mail address string cannot exceed a maximum length of 64 characters...

Page 130: ...t Description This function returns the number of Design Note keys for the specified remote file or folder path If unsupported by the source control system Dreamweaver gets this information from the c...

Page 131: ...ectionData argument is a pointer to the agent s data that passed into Dreamweaver during the Connect call The remotePath argument is the remote file or folder path that the DLL checks for the number o...

Page 132: ...gth argument is the length of the largest Design note for the specified file or folder Returns A Boolean value true if successful false otherwise bool SCS_IsRemoteNewer Description This function check...

Page 133: ...data that passed into Dreamweaver during the Connect call The remotePathList argument is a list of remote filenames or folder paths to get The localPathList argument is a mirrored list of local filena...

Page 134: ...e filenames or folder paths to put into the source control system The numItems argument is the number of items in each list Returns A Boolean value true if successful false otherwise bool SCS_canCheck...

Page 135: ...scription This function returns whether the New Folder menu item should be enabled Arguments void connectionData const char remotePath The connectionData argument is a pointer to the agent s data that...

Page 136: ...escription Dreamweaver calls this function before getting or checking out one or more files This function lets your DLL perform one operation such as adding a check out comment to a group of files Arg...

Page 137: ...BeforePut connectionData SCS_Put connectionData localPathList1 remotePathList1 successList1 SCS_Put connectionData localPathList2 remotePathList2 successList2 SCS_Put connectionData localPathList3 rem...

Page 138: ...This function lets the DLL perform any operation after a batch put or check in such as creating a summary dialog box Arguments connectionData The connectionData argument is a pointer to the agent s d...

Page 139: ...ocument You can use these functions to perform any task that the user can accomplish using menus floating panels property inspectors the Site panel or the Document window Chapter 11 Application 141 Ch...

Page 140: ......

Page 141: ...t you get information about these external applications and open files with them dreamweaver browseDocument Availability Dreamweaver 2 enhanced in 3 and 4 Description Opens the specified URL in the sp...

Page 142: ...ttp www hotwired com theBrowser For more information on the dreamweaver getBrowserList function see dreamweaver getBrowserList on page 142 dreamweaver getBrowserList Availability Dreamweaver 3 Descrip...

Page 143: ...rings Fireworks 3 file C Program Files Macromedia Fireworks 3 Fireworks 3 exe dreamweaver getExternalTextEditor Availability Dreamweaver 4 Description Gets the name of the currently configured externa...

Page 144: ...y browser Arguments None Returns A string that contains the path on the user s computer to the primary browser which is expressed as a file URL If no primary browser is defined it returns nothing drea...

Page 145: ...s packaged for Windows HTML Help or Help Viewer for Mac OS X The following four types of files comprise the full help content For more information on Help files see your operating system documentation...

Page 146: ...specific help book Dreamweaver uses the helpDoc js file when it calls help from JavaScript Arguments bookID The bookID argument which is required has the following format ID page The ID portion is th...

Page 147: ...ernal Editors entry in the Preferences dialog box Arguments None Returns Nothing dreamweaver openWithImageEditor Availability Dreamweaver 3 Description Opens the named file with the specified image ed...

Page 148: ...omputer false otherwise Global application functions Global application functions act on the entire application They handle tasks such as quitting and accessing Preferences dreamweaver beep Availabili...

Page 149: ...egory of Preferences Arguments None Returns A Boolean value that indicates whether the option is on dreamweaver quitApplication Availability Dreamweaver 3 Description Quits Dreamweaver after the scrip...

Page 150: ...ject It is the same string that a previous call to this function returned The function uses the contents of the source argument to initialize all the dialog box controls so they appear exactly as when...

Page 151: ...lements layers layout mode new document office floaters for the Panels category browsers for the Preview in Browser category site ftp status bar and validator If Dreamweaver does not recognize the arg...

Page 152: ...152 Chapter 11 Application...

Page 153: ...sitioning a toolbar and getting or setting focus History functions History functions handle undoing redoing recording and playing steps that appear in the History panel A step is any repeatable change...

Page 154: ...or presses Control Y Windows or Command Y Macintosh Arguments None Returns A string that contains the text that is associated with the editing operation that will be redone Example If the user s last...

Page 155: ...on returns Undo Apply span dreamweaver playRecordedCommand Availability Dreamweaver 3 Description Plays the recorded command in the active document Arguments None Returns Nothing Enabler dreamweaver c...

Page 156: ...aver isRecording on page 451 must return a value of false dreamweaver stopRecording Availability Dreamweaver 3 Description Stops recording without prompting the user Arguments None Returns Nothing Ena...

Page 157: ...mweaver 3 Description Copies the specified history steps to the Clipboard Dreamweaver warns the user about possible unintended consequences if the specified steps include an unrepeatable action Argume...

Page 158: ...st position is position 0 zero Example If the second third and fourth steps are selected in the History panel as shown in the following figure a call to the dreamweaver historyPalette getSelectedSteps...

Page 159: ...the three steps shown in the following example are selected in the History panel a call to the dreamweaver historyPalette getStepsAsJavaScript dw historyPalette getSelectedS teps function returns dw...

Page 160: ...eps in the History panel dreamweaver historyPalette saveAsCommand Availability Dreamweaver 3 Description Opens the Save As Command dialog box which lets the user save the specified steps as a command...

Page 161: ...ndoState The undoState argument is the object that the dreamweaver historyPalette getUndoState function returns Returns Nothing Insert object functions Insert object functions handle operations relate...

Page 162: ...rrent default object for the Media menu to the defID variable var defId dw objectPalette getMenuDefault DW_Media dreamweaver objectPalette setMenuDefault Availability Dreamweaver MX 2004 Description S...

Page 163: ...ard functions Keyboard functions mimic document navigation tasks that are accomplished by pressing the arrow Backspace Delete Page Up and Page Down keys In addition to such general arrow and key funct...

Page 164: ...f this argument is omitted the default is false Returns Nothing dom arrowRight Availability Dreamweaver 3 Description Moves the insertion point to the right the specified number of times Arguments nTi...

Page 165: ...ied number of times The exact behavior depends on whether there is a current selection or only an insertion point Arguments nTimes The nTimes argument which is optional is the number of times that a B...

Page 166: ...cates whether to extend the selection If the argument is omitted the default is false Returns Nothing dom endOfLine Availability Dreamweaver 3 Description Moves the insertion point to the end of the l...

Page 167: ...is optional is the number of words that the insertion point must move ahead If this argument is omitted the default is 1 The bShiftIsDown argument which is optional is a Boolean value that indicates...

Page 168: ...viousParagraph Availability Dreamweaver 3 Description Moves the insertion point to the beginning of the previous paragraph or skips multiple paragraphs if nTimes is greater than 1 Arguments nTimes bSh...

Page 169: ...g of the document that is before the first visible content in the Document window or before the opening HTML tag in the Code inspector depending on which window has focus Arguments bShiftIsDown The bS...

Page 170: ...on and the dreamweaver notifyMenuUpdated function are designed specifically to prevent unnecessary update routines from running on the dynamic menus that are built into Dreamweaver See dreamweaver get...

Page 171: ...file The menuListFunction argument must be one of the following strings dw cssStylePalette getStyles dw getDocumentDOM getFrameNames dw getDocumentDOM getEditableRegionList dw getBrowserList dw getRe...

Page 172: ...rrColumns argument is an array of column names to use in the list control Returns An object reference to the created window dreamweaver showResults Availability Dreamweaver MX 2004 Description Opens t...

Page 173: ...t Check or Site Reports Arguments resultWindowObj strIcon strDesc itemData iStartSel iEndSel colNdata The resultWindowObj argument is the object that the createResultsWindow function returns The strIc...

Page 174: ...alone results windows created with dreamweaver createResultsWindow This function is only available in the processFile callback of a site report See Reports in Extending Dreamweaver for details on sit...

Page 175: ...rrCmdNames argument is an array of command names on which to call the processFile function Returns Nothing resWin setColumnWidths Availability Dreamweaver 4 Description Sets the width of each column A...

Page 176: ...recursive true or not false Returns Nothing resWin setTitle Availability Dreamweaver 4 Description Sets the title of the window Arguments strTitle The strTitle argument is the new name of the floating...

Page 177: ...ing methods that are defined for stand alone Results windows dreamweaver resultsPalette siteReports dreamweaver resultsPalette validator dreamweaver resultsPalette btc Target Browser Check panel For m...

Page 178: ...ette canCopy on page 452 dreamweaver resultsPalette cut Availability Dreamweaver MX Description Sends a cut message to the window in focus often used for the FTP logging window Arguments None Returns...

Page 179: ...owser on page 453 dreamweaver resultsPalette openInEditor Availability Dreamweaver MX Description Jumps to the selected line for specific reports Site Reports Browser Target Check Validation and Link...

Page 180: ...ponse returns from the server Dreamweaver searches the response for a packet of XML that has a known signature If Dreamweaver finds XML with that signature it processes the XML and displays the contai...

Page 181: ...wwwroot ooo master cfm path timestamp CDATA 0 0 0 0 timestamp context debugnode name CDATA CGI name icon CDATA ServerDebugOutput ColdFusion CGIVariables gif icon debugnode name CDATA Pubs name sourceU...

Page 182: ...cfm path jumptoline debugnode serverdebuginfo Returns Nothing Toggle functions Toggle functions get and set various options either on or off dom getEditNoFramesContent Availability Dreamweaver 3 Desc...

Page 183: ...om getShowAutoIndent Availability Dreamweaver 4 Description This function determines whether auto indenting is on in the Code view of the document window Arguments None Returns A Boolean value true if...

Page 184: ...Dreamweaver 3 Description This function gets the current state of the View Head Content option Arguments None Returns A Boolean value true indicates the head content is visible false otherwise dom ge...

Page 185: ...lements Availability Dreamweaver 3 Description This function gets the current state of the View Invisible Elements option Arguments None Returns A Boolean value true indicates the invisible element ma...

Page 186: ...getShowRulers Availability Dreamweaver 3 Description This function gets the current state of the View Rulers Show option Arguments None Returns A Boolean value true indicates the rulers are visible f...

Page 187: ...e false otherwise dom getShowToolbar Availability Dreamweaver 4 Description This function determines whether the toolbar appears Arguments None Returns A Boolean value true if the toolbar appears fals...

Page 188: ...unction gets the current state of the View Grid Snap To option Arguments None Returns A Boolean value true indicates that the snap to grid option is on false otherwise dom setEditNoFramesContent Avail...

Page 189: ...rOverlaps Availability Dreamweaver 3 Description This function toggles the Prevent Layer Overlaps option on and off Arguments bPreventLayerOverlaps The bPreventLayerOverlaps argument is a Boolean valu...

Page 190: ...les the View Head Content option on and off Arguments bShowHead The bShowHead argument is a Boolean value true turns on the Head Content option false turns it off Returns Nothing dom setShowInvalidHTM...

Page 191: ...ilability Dreamweaver 3 Description This function toggles the View Invisible Elements option on and off Arguments bViewInvisibleElements The bViewInvisibleElements argument is a Boolean value true tur...

Page 192: ...dom setShowRulers Availability Dreamweaver 3 Description This function toggles the View Rulers Show option on and off Arguments bShowRulers The bShowRulers argument is a Boolean value true turns on t...

Page 193: ...turns Nothing dom setShowToolbar Availability Dreamweaver 4 Description This function shows or hides the Toolbar Arguments bShow The bShow argument is a Boolean value true indicates the toolbar should...

Page 194: ...s that the lines should wrap false otherwise Returns Nothing dom setSnapToGrid Availability Dreamweaver 3 Description This function toggles the View Grid Snap To option on or off Arguments bSnapToGrid...

Page 195: ...sible false otherwise dreamweaver htmlInspector getShowAutoIndent Availability Dreamweaver 4 Description This function determines whether the Auto Indent option is on in the Code inspector Arguments N...

Page 196: ...ver htmlInspector getShowSyntaxColoring Availability Dreamweaver 4 Description This function determines whether syntax coloring is on in the Code inspector Arguments None Returns A Boolean value true...

Page 197: ...4 Description This function turns highlighting of invalid HTML code on or off in the Code inspector Arguments bShow The bShow argument is a Boolean value true indicates that the highlighting of inval...

Page 198: ...tor setShowWordWrap Availability Dreamweaver 4 Description This function turns the Word Wrap option off or on in the Code inspector Arguments bShow The bShow argument is a Boolean value true turns Wor...

Page 199: ...ilability Dreamweaver 3 Description This function gets the current state of the Show Dependent Files option Arguments None Returns A Boolean value true indicates that dependent files are visible in th...

Page 200: ...reamweaver 3 Description This function gets the current state of the Tool Tips option Arguments None Returns A Boolean value true indicates that the tool tips are visible in the Site panel false other...

Page 201: ...itles Availability Dreamweaver 3 Description This function toggles the Show Page Titles option in the site map on or off Arguments bShowPageTitles The bShowPageTitles argument is a Boolean value true...

Page 202: ...the specified toolbar Arguments toolbarID The toolbarID argument is the ID of the toolbar with the items Dreamweaver should update Returns Nothing dom getShowToolbarIconLabels Availability Dreamweaver...

Page 203: ...d toolbar item Arguments toolbarID itemID The toolbarID argument is a string that specifies the ID of the toolbar that contains the item for which you want a value The itemID argument is a string that...

Page 204: ...llowing example stores the label for myEditbar in the variable label var label dom getToolbarLabel myEditbar dom getToolbarVisibility Availability Dreamweaver MX Description This function returns a Bo...

Page 205: ...ple The following example calls dom setToolbarItemAttribute three times to set the image imageOver and tooltip attributes for the toolbar item MyButton on the toolbar having the ID DW_Toolbar_Main var...

Page 206: ...position The toolbar appears at the top of the document window below makes the toolbar appear at the beginning of the row immediately below the toolbar that relative_to specifies Dreamweaver reports...

Page 207: ...ctions handle operations that are related to the document window and the floating panels The window functions show and hide floating panels determine which part of the Document window has focus and se...

Page 208: ...window that contains the document Arguments None Returns A string that contains the text that appears between the TITLE tags in the document or nothing if the document is not in an open window dom se...

Page 209: ...The floaterName argument is the name of the window panel or inspector Returns Nothing Example The following example opens and flashes the Assets panel dw bringAttentionToFloater library dreamweaver c...

Page 210: ...ts Arguments None Returns An array of document objects each corresponding to an open Document window If a document window contains a frameset the document object refers to the frameset not the content...

Page 211: ...viors Code inspector html Components server components CSS Styles css styles Bindings data sources Frames frames History history HTML Styles html styles Insert bar objects Layers layers Library librar...

Page 212: ...s The html string if the Code inspector is in focus The floaterName string if bAllowFloaters is true and a floating panel has focus where floaterName is objects properties launcher library css styles...

Page 213: ...ndows should be restored Returns Nothing dreamweaver setActiveWindow Availability Dreamweaver 3 Description This function activates the window that contains the specified document Arguments documentOb...

Page 214: ...panel If Dreamweaver cannot find a floating panel named floaterName this function has no effect The floaterName values for built in Dreamweaver panels are the strings to the right of the panel names...

Page 215: ...w to display at the top of the document window it can be one of the following values design or code Returns Nothing dreamweaver setSnapDistance Availability Dreamweaver 4 Description This function set...

Page 216: ...ch window next to another one without overlapping the documents This process is similar to splitting the workspace vertically Arguments None Returns Nothing Example The following example tiles the ope...

Page 217: ...ame The floaterName argument is the name of the window If the floating panel name is reference the visible invisible state of the Reference panel is updated by the user s selection in Code view All ot...

Page 218: ...218 Chapter 12 Workspace...

Page 219: ...dia Dreamweaver MX 2004 reporting features so you can initiate monitor and customize the reporting process For more information see Reports in Extending Dreamweaver Help dreamweaver isReporting Availa...

Page 220: ...tion dreamweaver loadSitesFromPrefs Availability Dreamweaver 4 Description Loads the site information for all the sites from the system registry Windows or the Dreamweaver Preferences file Macintosh i...

Page 221: ...ler site canAddLink on page 455 site addLinkToNewFile Availability Dreamweaver 3 Description Opens the Link to New File dialog box to let the user specify details for the new file and creates a link f...

Page 222: ...In Availability Dreamweaver 3 Description Checks in the selected files and handles dependent files in one of the following ways If the user selects Prompt on Put Check In in the Site FTP preferences t...

Page 223: ...ility Dreamweaver 3 Description Checks out the selected files and handles dependent files in one of the following ways If the user selects Prompt on Get Check Out in the Site FTP preferences the Depen...

Page 224: ...Dreamweaver MX Description Cloaks the current selection in the Site panel or the specified folder Arguments siteOrURL The siteOrURL argument must contain one of the following two values The keyword s...

Page 225: ...ied file or files in the testing server s bin folder If the current site does not have any settings defined for deploying supporting files this function invokes the Deploy Supporting Files To Testing...

Page 226: ...ws a sample XML file that Dreamweaver creates when you export a site xml version 1 0 site localinfo sitename DW00 localroot C Documents and Settings jlondon Desktop DWServer imagefolder C Documents an...

Page 227: ...n left show TRUE share FALSE builtin FALSE localwidth 50 remotewidth 50 fileviewcolumns appserverinfo servermodel ColdFusion urlprefix http dreamweaver kojak serverscripting CFML serverpageext connect...

Page 228: ...If the user selects Prompt on Get Check Out in the Site FTP preferences the Dependent Files dialog box appears If the user previously selected the Don t Show Me Again option in the Dependent Files di...

Page 229: ...One of the following strings none local network ftp source_control site getAppServerPathToFiles Availability Dreamweaver MX Description Determines the path to the remote files on the application serve...

Page 230: ...associated with the current site Arguments None Returns A string that contains a login and check out name if defined or an empty string if Check In Check Out is disabled Example A call to site getChe...

Page 231: ...pecified only the login name returns for example denise site getCloakingEnabled Availability Dreamweaver MX Description Determines whether cloaking is enabled for the current site Arguments None Retur...

Page 232: ...tSite returns the one that is currently showing in the Current Sites List in the Site panel site getFocus Availability Dreamweaver 3 Description Determines which pane of the Site panel has focus Argum...

Page 233: ...Explorer uses this function see site getAppServerAccessType and site getAppServerPathToFiles Arguments None Returns The path to the files residing on the local computer for the current site site getS...

Page 234: ...eaver MX Description Creates a Dreamweaver site from an XML file During import if the folder that is specified by the localroot attribute of the localinfo element does not exist on the local computer...

Page 235: ...function should test the selection in the Site panel The file URL of a particular folder which indicates that isCloaked should test the specified folder Returns A Boolean value true if the specified o...

Page 236: ...nly flag on the selected files Arguments None Returns Nothing Enabler site canMakeEditable on page 459 site makeNewDreamweaverFile Availability Dreamweaver 3 Description Creates a new Dreamweaver file...

Page 237: ...r site canMakeNewFileOrFolder on page 459 site newHomePage Availability Dreamweaver 3 Description Opens the New Home Page dialog box to let the user create a new home page Note This function operates...

Page 238: ...In in the Site FTP preferences the Dependent Files dialog box appears If the user previously selected the Don t Show Me Again option in the Dependent Files dialog box and clicked Yes dependent files a...

Page 239: ...lability Dreamweaver 3 Description Refreshes the file listing on the specified side of the Site panel Arguments whichSide The whichSide argument must be local or remote If the site map has focus and w...

Page 240: ...renameSelection Availability Dreamweaver 3 Description Turns the name of the selected file into an text field so the user can rename the file If more than one file is selected this function acts on t...

Page 241: ...and jpeg If the argument is omitted or if the value is not valid on the current platform the default is bmp in Windows and pict on the Macintosh Returns Nothing site selectAll Availability Dreamweave...

Page 242: ...age Availability Dreamweaver 3 Description Designates the file that is selected in the Site Files view as the home page for the site Arguments None Returns Nothing site setCloakingEnabled Availability...

Page 243: ...site Returns Nothing site setCurrentSite Availability Dreamweaver 3 Description Opens the specified site in the local pane of the Site panel Arguments whichSite The whichSite argument is the name of a...

Page 244: ...following strings local remote or site map Returns Nothing site setLayout Availability Dreamweaver 3 Description Opens the Site Map Layout pane in the Site Definition dialog box Arguments None Returns...

Page 245: ...rayOfURLs argument is an array of strings where each string is a path to a file or folder in the current site which is expressed as a file URL Note Omit the trailing slash when specifying folder paths...

Page 246: ...function should act on the selection in the Site panel The URL of a particular folder which indicates that the unCloak function should act on the specified folder and all its contents Returns Nothing...

Page 247: ...ote copy Arguments siteOrURL The siteOrURL argument must be the keyword site which indicates that the function should act on the selection in the Site panel or the URL for a single file Returns Nothin...

Page 248: ...248 Chapter 13 Site...

Page 249: ...L to an absolute URL get the currently selected node perform URL encoding on a string or run a translator on the document Conversion functions Conversion functions convert tables to layers layers to t...

Page 250: ...3 Description Opens the Edit Command List dialog box Arguments None Returns Nothing dreamweaver popupCommand deprecated Availability Dreamweaver 2 deprecated in 3 in favor of dreamweaver runCommand D...

Page 251: ...another extension file Note This function can be called within the objectTag function from any script in a command file or from the Property inspector file Arguments commandFile commandArg1 commandArg...

Page 252: ...the cleanupXHTML function cleans up the entire document otherwise this function cleans up only the selection Returns An array of six integers that quantify the number of the following elements XHTML e...

Page 253: ...and cannot be fixed The style elements that do not have a type attribute and cannot be fixed The img elements that do not have an alt attribute and cannot be fixed The area elements that do not have a...

Page 254: ...ress warnings about the selected file being outside the site root If this argument is omitted it defaults to a value of false The arrayOfExtensions argument added in Dreamweaver 4 is an array of strin...

Page 255: ...calls this function finishes executing Returns Nothing dreamweaver createDocument Availability Dreamweaver 2 enhanced in Dreamweaver 4 Description Depending on the argument that you pass to this func...

Page 256: ...nt it reads a file named default xhtml which is located in the Configuration Templates folder and using the content of that file creates an output file that contains the following skeleton declaration...

Page 257: ...e that the dreamweaver getDocumentDOM function returns dreamweaver createXMLDocument Availability Dreamweaver MX Description Creates and opens a new XML file which is empty except for the XML directiv...

Page 258: ...s on the document that has focus which must be a template If you do not specify a filename argument Dreamweaver MX opens a dialog box to request the export file string Arguments filePath The filePath...

Page 259: ...L it is relative to the extension file Note If the argument is document the calling function must be the applyBehavior deleteBehavior objectTag function or any function in a command or Property inspec...

Page 260: ...OM dreamweaver getRecentFileList Availability Dreamweaver 3 Description Gets a list of all the files in the recent files list at the bottom of the File menu Arguments None Returns An array of strings...

Page 261: ...teAndShowDialog argument which is optional has a value of true or false Specify true to open a document with the current site and to cause the New Document dialog box to appear false otherwise Returns...

Page 262: ...elative to the file that contains the script that called this function Returns The document object for the specified file which is the same value that the dreamweaver getDocumentDOM function returns d...

Page 263: ...reamweaver getDocumentDOM functions are automatically released when the script that contains the call finishes executing If the script opens many documents you must use this function to explicitly rel...

Page 264: ...nRevertDocument on page 446 dreamweaver saveAll Availability Dreamweaver 3 Description Saves all open documents opening the Save As dialog box for any documents that have not been saved previously Arg...

Page 265: ...s A Boolean value that indicates success true or failure false Enabler dreamweaver canSaveDocument on page 447 dreamweaver saveDocumentAs Availability Dreamweaver 3 Description Opens the Save As dialo...

Page 266: ...a document s DOM tree which is the value that the dreamweaver getDocumentDOM function returns Returns Nothing Enabler dreamweaver canSaveFramesetAs on page 448 dreamweaver saveFramesetAs Availability...

Page 267: ...box if necessary and notifies the user when the check is complete Arguments None Returns Nothing dom checkTargetBrowsers Availability Dreamweaver 3 Description Runs a target browser check on the docu...

Page 268: ...etting specified in the Validator section of the Preferences dialog box Arguments controlString bOpenResultsWindow bShowInfoMessage The controlString argument is an optional string with four possible...

Page 269: ...explicit false true The following example does not prompt the user to save an unsaved document If the document has not been saved the validation will not start If the document has been saved Dreamwea...

Page 270: ...center 5000 dw getDocumentDOM showInfoMessagePopup toolbar DW_Toolbar_Main DW_SetTitle Don t forget the title for the window 5000 See also dom hideInfoMessagePopup on page 268 dom showPagePropertiesD...

Page 271: ...which browser to return a valid reference The tagObject argument is a tag object in the DOM tree Returns A string that represents a valid JavaScript reference to the object such as document layers my...

Page 272: ...ent is a relative URL it is relative to the extension file The third and subsequent arguments if supplied are the names of tags for example IMG FORM or HR Returns An array of strings where each array...

Page 273: ...the argument is a relative URL it is relative to the extension file The second and subsequent arguments if supplied are the names of tags for example IMG FORM HR Returns An array of strings where eac...

Page 274: ...e of the specified entry is not an integer Example The following example returns the integer value of the Snap Distance setting in the My Extension section of Preferences If there is no MyExtension se...

Page 275: ...stored with Dreamweaver preferences when Dreamweaver is not running Arguments section key new_value The section argument is a string that specifies the preferences category in which the option is set...

Page 276: ...category option that the functions sets If the category option does not exist Dreamweaver creates it The new_value argument is a string that specifies the value of the category option Returns A true v...

Page 277: ...stored in the Configuration folder in the Dreamweaver application folder var sortCmd dreamweaver getConfigurationPath Commands Sort Table htm var sortDOM dreamweaver getDocumentDOM sortCmd dreamweave...

Page 278: ...lderPath Availability Dreamweaver MX Description Gets the full path to a temporary folder where you can store temporary or transient files This function looks for a Temp folder inside the Dreamweaver...

Page 279: ...n absolute URL string The return value is generated as described in the following list If relURL is an absolute URL no conversion occurs and the return value is the same as relURL If relURL is a docum...

Page 280: ...re n is the number of selected items The first integer in each pair is the character offset of the opening of the selection including the opening TD DIV SPAN LAYER ILAYER or MAP tag the second integer...

Page 281: ...The offsetEnd argument specifies the offset from the beginning of the document to the end of a range of characters that is an object in the DOM tree Returns The tag text or comment object that complet...

Page 282: ...optional is a Boolean value that indicates whether to scroll the Document window if necessary to make the selection visible If it is omitted this argument defaults to false Returns Nothing dom setSele...

Page 283: ...ng extensions you reference a node and then perform an operation that deletes it such as setting the innerHTML or outerHTML properties of its parent This function lets you confirm that the node hasn t...

Page 284: ...unction returns Returns An array that contains two integers The first integer is the byte offset for the opening of the tag text or comment the second integer is the byte offset for the closing of the...

Page 285: ...eaver setSelection deprecated Availability Dreamweaver 2 deprecated in 3 in favor of dom setSelection on page 282 Description Sets the selection in the current document This function can move the sele...

Page 286: ...The following example shows the URL value for My URL encoded string var URL dw doURLEncoding theURL value returns My 20URL encoded 20string dreamweaver getTokens Availability Dreamweaver 1 Description...

Page 287: ...te This function has no effect in Windows because Windows encodings are already based on Latin 1 Arguments stringToConvert The stringToConvert argument is the string to convert from Latin 1 encoding t...

Page 288: ...e function accepts two arguments a string that contains the attribute name for example color or src and a string that contains the attribute value for example 000000 or foo gif The attribute function...

Page 289: ...vaScript object that has one or more of the following methods openTagBegin openTagEnd closeTagBegin closeTagEnd directive attribute and text For best performance parserCallbackObj should be a shared l...

Page 290: ...Returns Nothing dreamweaver editLockedRegions Availability Dreamweaver 2 Description Depending on the value of the argument this function makes locked regions editable or non editable By default locke...

Page 291: ...the translated source the HTML that is contained in the DOM after a translator runs not the untranslated source Note This function is relevant only in Property inspector files Arguments bUseTranslated...

Page 292: ...292 Chapter 14 Document...

Page 293: ...ts panel functions which are programmed into the API as an asset panel let you manage and use the elements in the Assets panel templates libraries images Macromedia Shockwave and Macromedia Flash cont...

Page 294: ...at are selected in the Site panel or site map to the Favorites list This function handles only images movies scripts Shockwave files Flash files and URLs in the case of the site map If other folders o...

Page 295: ...ments None Returns Nothing Enabler dreamweaver assetPalette canEdit on page 442 dreamweaver assetPalette getSelectedCategory Availability Dreamweaver 4 Description Returns the currently selected categ...

Page 296: ...nd a URL MyFavoriteURL are both selected in the Favorites list the function returns the following list items 0 MyFolderName items 1 path FolderName items 2 folder items 3 MyFavoriteURL items 4 http ww...

Page 297: ...setPalette newAsset Availability Dreamweaver 4 Description Creates a new element for the current category in the Favorites list For library and templates this is a new blank library or template file t...

Page 298: ...pector Arguments None Returns Nothing dreamweaver assetPalette refreshSiteAssets Availability Dreamweaver 4 Description Scans the site switches to the Site list and populates the list Arguments None R...

Page 299: ...aver assetPalette setSelectedCategory Availability Dreamweaver 4 Description Switches to show a different category Arguments categoryType The categoryType argument can be one of the following categori...

Page 300: ...lectedItem deprecated Availability Dreamweaver 3 deprecated in 4 in favor of dreamweaver assetPalette getSelectedItems Description This function gets the path of the selected library item Arguments No...

Page 301: ...uments None Returns Nothing dreamweaver libraryPalette renameSelectedItem deprecated Availability Dreamweaver 3 deprecated in Dreamweaver 4 in favor of using dreamweaver assetPalette setSelectedCatego...

Page 302: ...deprecated in Dreamweaver 4 in favor of using dreamweaver assetPalette setSelectedCategory with templates as the argument value and then calling dreamweaver assetPalette removeFromFavorites Descripti...

Page 303: ...in the Behaviors panel not the selection in the current document dom addBehavior Availability Dreamweaver 3 Description Adds a new event action pair to the selected element This function is valid onl...

Page 304: ...event 0 is first and 1 is second If you omit this argument the function returns all the actions for the specified event Returns A string that represents the function call for example MM_swapImage docu...

Page 305: ...rst and 1 is second If you omit this argument all the actions for the specified event are removed Returns Nothing dreamweaver getBehaviorElement Availability Dreamweaver 2 Description Gets the DOM obj...

Page 306: ...nt var CANBEAPPLIED theTag tagName A theTag getAttribute HREF null theTag getAttribute TARGET null if CANBEAPPLIED display the action UI else display a helpful message that tells the user that this ac...

Page 307: ...tion lets extension files other than actions attach behaviors to objects in the user s document It blocks other edits until the user dismisses the dialog box Note This function can be called within th...

Page 308: ...n returns an array that contains two strings onMouseOver and MM_changeProp document moon document moon src sun gif MG dreamweaver behaviorInspector getBehaviorCount Availability Dreamweaver 3 Descript...

Page 309: ...f the first action in the Behaviors panel is selected as shown in the following figure a call to the dreamweaver behaviorInspector getSelectedBehavior function returns 0 dreamweaver behaviorInspector...

Page 310: ...ny other position has no effect because the onClick and onFocus events each have only one associated behavior and the behavior at position 3 is already at the bottom of the onMouseDown event group dre...

Page 311: ...nFocus events each have only one associated behavior and the behavior at position 2 is already at the top of the onMouseDown event group dreamweaver behaviorInspector setSelectedBehavior Availability...

Page 312: ...ions that can operate in text fields are implemented as methods of the dreamweaver object and as methods of the DOM object The dreamweaver version of the function operates on the selection in the acti...

Page 313: ...aver 3 Description Removes the selection including any HTML markup that defines the selection to the Clipboard Arguments None Returns Nothing dom clipPaste Availability Dreamweaver 3 Description Paste...

Page 314: ...reamweaver 3 Description Pastes the contents of the Clipboard into the current document at the insertion point or in place of the current selection It replaces any linefeeds in the Clipboard content w...

Page 315: ...tDOM clipPasteText results in the following figure dreamweaver clipCopy Availability Dreamweaver 3 Description Copies the current selection from the active Document window dialog box floating panel or...

Page 316: ...turns Nothing Enabler dreamweaver canClipCut on page 443 dreamweaver clipPaste Availability Dreamweaver 3 Description Pastes the contents of the Clipboard into the current document dialog box floating...

Page 317: ...as creating updating and breaking links between a document and a template or library item Methods of the dreamweaver libraryPalette object either control or act on the selection in the Assets panel l...

Page 318: ...ach from Original in the Property inspector Arguments None Returns Nothing dom detachFromTemplate Availability Dreamweaver 3 Description Detaches the current document from its associated template Argu...

Page 319: ...ectedEditableRegion on page 320 dom getIsLibraryDocument Availability Dreamweaver 3 Description Determines whether the document is a library item Arguments None Returns A Boolean value that indicates...

Page 320: ...alog box with the contents of the selected editable region var theDOM dw getDocumentDOM var edRegs theDOM getEditableRegionList var selReg theDOM getSelectedEditableRegion alert edRegs selReg innerHTM...

Page 321: ...name of the region surrounded by curly braces into the document at the insertion point location Arguments None Returns Nothing Enabler dom canMakeNewEditableRegion on page 437 dom removeEditableRegion...

Page 322: ...tional typeOfUpdate argument must be library template or both If you omit the argument the default is both Returns Nothing dreamweaver updatePages Availability Dreamweaver 3 Description Opens the Upda...

Page 323: ...version 1 0 encoding utf 8 The following sample shows a snippet file snippet name Detect Flash description VBscript to check for Flash ActiveX control preview code factory true type wrap insertText lo...

Page 324: ...er to the snippet selected in the Snippets panel Returns an empty string if no snippet is selected dreamweaver snippetPalette newFolder Availability Dreamweaver MX Description Creates a new folder wit...

Page 325: ...editing for the selected element Arguments None Returns Nothing Enabler dreamweaver snippetpalette canEditSnippet on page 454 dreamweaver snippetPalette insert r Availability Dreamweaver MX Descripti...

Page 326: ...nippet function inserts the code snippet at the location specified by the argument into the current document at the insertion point dw snippetPalette insertSnippet Text Different_Link_Color csn dreamw...

Page 327: ...ver behavior to a document or getting the names of all currently defined server models Server Components functions Server Components functions let you access the currently selected node of the Server...

Page 328: ...ction for each file in the Configuration DataSources folder You can use this function to generate a list of all the data sources in the user s document This function iterates through all the files in...

Page 329: ...uch as a session variable Extension Data Manager functions The APIs in this section comprise the Extension Data Manager EDM You can programmatically access and manipulate the data that is contained in...

Page 330: ...This function retrieves the list of participants from an EDML group file or participant files Arguments value qualifier s The value argument is a property value or it is blank and is ignored For examp...

Page 331: ...ed data Live data functions You can use the following live data functions to mimic menu functionality The showLiveDataDialog function is used for the View Live Data Settings menu item The setLiveDataM...

Page 332: ...you view your page layout with live data and adjust it if necessary Before you view live data you must enter Live Data settings for any URL parameters that you reference in your document This prevents...

Page 333: ...ver to execute the scripts in the document and returns the resulting HTML document This function can be called only from a translator s liveDataTranslateMarkup function if you try to call it at anothe...

Page 334: ...that called liveDataTranslate determines that the server returned an error message it calls setLiveDataError to display the error message in Dreamweaver This message appears after the liveDataTransla...

Page 335: ...ment This prevents the web server from returning errors for parameters that are otherwise undefined in the simulation You enter the URL parameters in name value pairs For example if you reference the...

Page 336: ...f the participants to locate in the user s document This string is the filename without the edml extension Returns This function returns an array that contains all instances of the specified participa...

Page 337: ...the objects in the array The objects are sorted in the order that they appear in the Server Behaviors panel dreamweaver popupServerBehavior Availability Dreamweaver UltraDev 1 Description Applies a n...

Page 338: ...loads the server model So when an extension calls functions such as dom serverModel getServerName dom serverModel getServerLanguage and dom serverModel getServerVersion these functions return the stor...

Page 339: ...expression that matches the closing script delimiter The participateInMerge pattern is a Boolean value that specifies whether the content that is enclosed in the listed delimiters should true or shou...

Page 340: ...vailability Dreamweaver MX Description Returns the following list of properties which let you access Translator URL patterns File references Type Arguments None Returns A list of objects one for each...

Page 341: ...Info Availability Dreamweaver MX Description Returns information that is specific to the current server model This information is defined in the HTML definition file for the server model which is loca...

Page 342: ...guage function reads the serverLanguage property of the object that is returned by a call to the getServerInfo function in the Server Models API Arguments None Returns A string that contains the suppo...

Page 343: ...charset attribute of a meta tag that is associated with a document Supported values for a given server model are defined in the HTML definition file for the server model which is located in the Confi...

Page 344: ...her the request to connect to the application server was successful dreamweaver getServerModels Availability Dreamweaver MX Description Gets the names for all the currently defined server models The s...

Page 345: ...the dreamweaver cssRuleTracker object either control or act on the selection in the CSS rule tracker panel of the Selection inspector Methods of the dreamweaver cssStylePalette object either control o...

Page 346: ...red style to the selection either by surrounding the selection with SPAN tags or by applying a CLASS attribute to the tag that surrounds the selection var theDOM dreamweaver getDocumentDOM document t...

Page 347: ...ments None Returns Nothing Enabler dreamweaver cssRuleTracker canEditSelectedRule on page 449 dreamweaver cssRuleTracker newRule Availability Dreamweaver MX 2004 Description Opens the New CSS Style di...

Page 348: ...Arguments None Returns Nothing dreamweaver cssStylePalette deleteSelectedStyle Availability Dreamweaver 3 Description Deletes the style that is currently selected in the CSS Styles panel from the docu...

Page 349: ...ens the Style Definition dialog box for the style that is currently selected in the CSS Styles panel Arguments None Returns Nothing Enabler dreamweaver cssStyle canEditSelectedStyle on page 450 dreamw...

Page 350: ...name returns For instance p class1 is a selector that means the style is applied to any p tag of class1 but it does not apply for instance to a div tag of class1 Without the fullSelector argument the...

Page 351: ...urns A deprecated function always returns a null value dreamweaver cssStylePalette getStyles Availability Dreamweaver 3 Description Gets a list of all the class styles in the active document Arguments...

Page 352: ...or rendering Refreshes the rendering of all open documents Arguments mediaType The mediaType argument specifies the new target media type Returns Nothing Example dw cssStylePalette setMediaType print...

Page 353: ...dom isDocumentInFrame Availability Dreamweaver 4 Description Identifies whether the current document is being viewed inside a frameset Arguments None Returns A Boolean value true if the document is i...

Page 354: ...440 Layer and image map functions Layer and image map functions handle aligning resizing and moving layers and image map hotspots The function description indicates if it applies to layers or to hotsp...

Page 355: ...mweaver 3 Description Makes the selected layers or hotspots equal in height width or both The last layer or hotspot selected is the guide Arguments bHoriz bVert The bHoriz argument is a Boolean value...

Page 356: ...ayer or hotspot The top argument is the new position of the top boundary of the layer or hotspot The bottom argument is the new position of the bottom boundary of the layer or hotspot The right argume...

Page 357: ...rigin and units turn the grid on and off and change its settings and start or stop playing plug ins dom getRulerOrigin Availability Dreamweaver 3 Description Gets the origin of the ruler Arguments Non...

Page 358: ...et Enabler dom hasTracingImage on page 441 dom loadTracingImage Availability Dreamweaver 3 Description Opens the Select Image Source dialog box If the user selects an image and clicks OK the Page Prop...

Page 359: ...Dreamweaver 3 Description Sets the origin of the ruler Arguments xCoordinate yCoordinate The xCoordinate argument is a value expressed in pixels on the horizontal axis The yCoordinate argument is a v...

Page 360: ...horizontal coordinate The y argument is the number of pixels that specify the vertical coordinate Returns Nothing Enabler dom hasTracingImage on page 441 dom setTracingImageOpacity Availability Dream...

Page 361: ...Enabler dom hasTracingImage on page 441 dom stopAllPlugins Availability Dreamweaver 3 Description Stops all plug in content that is currently playing in the document Arguments None Returns Nothing dom...

Page 362: ...bility Dreamweaver 3 Description Moves the visible floating panels to their default positions Arguments None Returns Nothing dreamweaver showGridSettingsDialog Availability Dreamweaver 3 Description O...

Page 363: ...reamweaver 4 Description Creates a layout cell in the current document at the specified position and dimensions either within an existing layout table or in the area below the existing content on the...

Page 364: ...annot be created Arguments left top width height The left argument is the x position of the left border of the table The top argument is the y position of the top border of the table The width argumen...

Page 365: ...iption If the user clicks a menu button in the header of a table in Layout view and causes the table header menu to appear this function returns the index of the column that the user clicked The resul...

Page 366: ...e document size This function fails if the current selection is not a table Arguments colNum The colNum argument is the column to be automatically sized or fixed width Returns Returns true if the colu...

Page 367: ...are no more spacer images that Dreamweaver generated This function fails if the current selection is not a table or if the operation is not successful Arguments colNum The colNum argument is the colum...

Page 368: ...document into Layout view Arguments bShow The bShow argument indicates whether to display tabs for layout tables when the current document is in Layout view If bShow is true Dreamweaver displays tabs...

Page 369: ...Availability Dreamweaver 3 Description This function converts all WIDTH attributes in the current table from pixels to percentages Arguments None Returns Nothing dom convertWidthsToPixels Availability...

Page 370: ...e Arguments None Returns Nothing Enabler dom canDecreaseRowspan on page 434 dom deleteTableColumn Availability Dreamweaver 3 Description This function removes the selected table column or columns Argu...

Page 371: ...outside the table This function has no effect if the Faster Table Editing option is not selected Arguments None Returns Nothing dom getShowTableWidths Availability Dreamweaver MX 2004 Description Ret...

Page 372: ...columns and the second array item is the number of rows If no table is selected nothing returns dom increaseColspan Availability Dreamweaver 3 Description This function increases the column span by o...

Page 373: ...before the column that contains the selection false otherwise Returns Nothing Enabler dom canInsertTableColumns on page 436 dom insertTableRows Availability Dreamweaver 3 Description This function ins...

Page 374: ...er dom canMergeTableCells on page 438 dom removeAllTableHeights Availability Dreamweaver 3 Description This function removes all HEIGHT attributes from the selected table Arguments None Returns Nothin...

Page 375: ...ion Toggles the display of table widths on and off in standard or Expanded Tables mode non Layout mode This function sets the value for the current document and any future document unless otherwise sp...

Page 376: ...ability Dreamweaver 3 Description This function sets the number of columns in the selected table Arguments numberOfCols The numberOfCols argument specifies the number of columns to set in the table Re...

Page 377: ...ll Availability Dreamweaver 3 Description This function splits the current table cell into the specified number of rows or columns If one or both of the arguments is omitted the Split Cells dialog box...

Page 378: ...378 Chapter 17 Design...

Page 379: ...deHints xml file For information on the CodeHints xml file see Extending Dreamweaver You can also add new Code Hints menus dynamically through JavaScript after Dreamweaver loads the contents of the Co...

Page 380: ...ecifies the URL for a single image file that Dreamweaver uses for all items in the menu If it is an array of strings it must be the same length as the labelArray argument Each string is a URL relative...

Page 381: ...argument which is optional specifies that this function is active for only certain document types You can specify the doctypes argument as a comma separated list of document type IDs For a list of Dr...

Page 382: ...cument type IDs For a list of Dreamweaver document types see the Dreamweaver Configuration Documenttypes MMDocumentTypes xml file Returns Nothing Example Your JavaScript code might build a Code Hints...

Page 383: ...was specified previously by dreamweaver setUpFind by dreamweaver setUpComplexFind or by the user in the Find dialog box and selects the instance in the document Arguments bUseLastSetupSearch The bUseL...

Page 384: ...ches the search criteria that was specified by dreamweaver setUpFindReplace by dreamweaver setUpComplexFindReplace or by the user in the Replace dialog box with the specified replacement content Argum...

Page 385: ...string of XML code that begins with the dwquery tag and ends with the dwquery tag To get a string of the proper format set up the query in the Find dialog box click the Save Query button open the quer...

Page 386: ...erty which is optional is a Boolean value that indicates whether white space differences should be ignored The ignoreWhitespace property defaults to false if the value of the useRegularExpressions pro...

Page 387: ...which is optional is a Boolean value that indicates whether white space differences should be ignored The ignoreWhitespace property defaults to false if the useRegularExpressions property has a value...

Page 388: ...ens the Find dialog box Arguments None Returns Nothing Enabler dreamweaver canShowFindDialog on page 448 dreamweaver showFindReplaceDialog Availability Dreamweaver 3 Description Opens the Replace dial...

Page 389: ...es the specified character markup to any subsequently typed text Arguments tagName The tagName argument is the tag name that is associated with the character markup It must be one of the following str...

Page 390: ...or editing the specified Document attribute In most cases this interface is a dialog box This function is valid only for the active document Arguments attribute The attribute is a string that specifie...

Page 391: ...e FONT tag for the current selection Arguments attribute The attribute argument must be face size or color Returns A string that contains the value of the specified attribute or an empty string if the...

Page 392: ...target of the link that surrounds the current selection This function is equivalent to looping through the parents and grandparents of the current node until a link is found and then calling the getA...

Page 393: ...weaver 3 Description Gets the block format of the selected text Arguments None Returns A string that contains the block tag that is associated with the text for example p h1 pre and so on or an empty...

Page 394: ...None Returns Nothing dom insertHTML Availability Dreamweaver 3 Description Inserts HTML content into the document at the current insertion point Arguments contentToInsert bReplaceCurrentSelection The...

Page 395: ...s can be stored in separate folders it s important that these files have unique names If a file called Button htm exists in the Forms folder and also in the MyObjects folder Dreamweaver cannot disting...

Page 396: ...nter is outside all blocks Arguments None Returns Nothing Example If the current selection is inside a center aligned paragraph a call to the dom newBlock function inserts p align center after the cur...

Page 397: ...ame The tagName argument is the tag name that is associated with the character markup It must be one of the following strings b cite code dfn em i kbd samp s strong tt u or var Returns Nothing dom rem...

Page 398: ...elected object The newHeight argument specifies the new height to which the function will set the selected object Returns Nothing dom setAttributeWithErrorChecking Availability Dreamweaver 3 Descripti...

Page 399: ...s Returns Nothing Enabler dom canSetLinkHref on page 439 dom setLinkTarget Availability Dreamweaver 3 Description Sets the target of the link that surrounds the current selection This function is equi...

Page 400: ...owListPropertiesDialog Availability Dreamweaver 3 Description Opens the List Properties dialog box Arguments None Returns Nothing Enabler dom canShowListPropertiesDialog on page 440 dom setListTag Ava...

Page 401: ...thing dom setTextFieldKind Availability Dreamweaver 3 Description Sets the format of the selected text field Arguments fieldType The fieldType argument must be input textarea or password Returns Nothi...

Page 402: ...reamweaver 3 Description Deletes the selection in the active document or the Site panel on the Macintosh it deletes the text box that has focus in a dialog box or floating panel Arguments None Returns...

Page 403: ...wing items Arial Helvetica sans serif Times New Roman Times serif Courier New Courier mono Georgia Times New Roman Times serif Verdana Arial Helvetica sans serif dreamweaver getFontStyles Availability...

Page 404: ...d Command keys Macintosh are pressed before performing an operation if dw getKeyState Shift dw getKeyState Cmd execute code dreamweaver getNaturalSize Availability Dreamweaver 4 Description Returns th...

Page 405: ...rtions of code from the Code view On the Macintosh it prints all code or a page range of code Arguments showPrintDialog document The showPrintDialog argument is true or false If this argument is set t...

Page 406: ...nt selection They remove any tag in the hierarchy wrap the selection inside a new tag and show the Quick Tag Editor to let the user edit specific attributes for the tag dom selectChild Availability Dr...

Page 407: ...pecified tag around the current selection If the selection is unbalanced Dreamweaver reports an error Arguments startTag The startTag argument is the source that is associated with the opening tag Ret...

Page 408: ...s within a split document view or the Code inspector window dom formatRange Availability Dreamweaver MX Description Applies Dreamweaver automatic syntax formatting to a specified range of characters i...

Page 409: ...information messages for the last auto validation also known as an inline validation of the document Currently only a target browser check is performed during auto validation see dom runValidation on...

Page 410: ...t needs to be moved before an operation occurs Arguments None Returns A Boolean value true if the current selection is in a valid piece of code false if the document has not been synchronized because...

Page 411: ...that indicates whether content is being selected If bShiftIsDown is true the content is selected Returns Nothing dom source arrowLeft Availability Dreamweaver 4 Description Moves the insertion point...

Page 412: ...Boolean value that indicates whether content is being selected If bShiftIsDown is true the content is selected otherwise it is not Returns Nothing dom source arrowUp Availability Dreamweaver 4 Descri...

Page 413: ...ty Dreamweaver 4 Description Places the insertion point at the end of the current Code view document If content is already selected this function extends the selection to the end of the document Argum...

Page 414: ...on point must move If nTimes is omitted the default is 1 The bShiftIsDown argument which is optional is a Boolean value that indicates whether content is being selected If bShiftIsDown is true the con...

Page 415: ...s negative or past the end of the file dom source getText Availability Dreamweaver 4 Description Returns the text string in the source between the designated offsets Arguments startOffset endOffset Th...

Page 416: ...to the showResults or setFloaterVisibility functions The floaterIndex object is an index of items in the floater results list The start object is the opening index of underlined code The end object is...

Page 417: ...otherwise dom source nextWord Availability Dreamweaver 4 Description Moves the insertion point to the beginning of the next word or words if specified in the Code view If content is already selected...

Page 418: ...Boolean value that indicates whether content is being selected If bShiftIsDown is true the content is selected Returns Nothing dom source pageUp Availability Dreamweaver 4 Description Moves the inser...

Page 419: ...nge Availability Dreamweaver 4 Description Replaces the range of source text between startOffset and endOffset with string If startOffset is greater than endOffset or if either offset is not a positiv...

Page 420: ...iption Scrolls the Code view down line by line without moving the insertion point Arguments nTimes The nTimes argument is the number of lines to scroll If nTimes is omitted the default is 1 Returns No...

Page 421: ...is 1 Returns Nothing dom source scrollPageUp Availability Dreamweaver 4 Description Scrolls the Code view up page by page without moving the insertion point Arguments nTimes The nTimes argument is th...

Page 422: ...Number argument is not a positive integer the function does nothing and returns false It puts the insertion point at the beginning of the last line if lineNumber is larger than the number of lines in...

Page 423: ...urns Nothing dom source topPage Availability Dreamweaver 4 Description Moves the insertion point to the top of the current page or to the top of the previous page if the insertion point is already at...

Page 424: ...on was an insertion point then the function places the insertion point between the startTag and endTag startTag and endTag don t have to be tags they can be any arbitrary text Arguments startTag endTa...

Page 425: ...SelectorTag Availability Dreamweaver MX Description This function gets the DOM node for the tag that is currently selected in the Tag Selector bar at the bottom of the document window Arguments None R...

Page 426: ...urns Nothing Enabler dreamweaver canPopupEditTagDialog on page 445 dreamweaver showTagChooser Availability Dreamweaver MX Description This function displays the Tag Chooser dialog box brings it to the...

Page 427: ...iously existing file within the TagLibraries folder dreamweaver tagLibrary getSelectedLibrary Availability Dreamweaver MX Description If a library node is selected in the Tag Library editor this funct...

Page 428: ...ported tag library dreamweaver tagLibrary getImportedTagList Availability Dreamweaver MX Description This function generates a list of tagInfo objects from an imported tag library Arguments libname Th...

Page 429: ...a var libName dw tagLibrary importDTDOrSchema fileURL prefix get the array of tags for this library this is the TagInfo object var tagArray dw tagLibrary getImportedTagList libName now I have an array...

Page 430: ...430 Chapter 18 Code...

Page 431: ...er the descriptions are not intended to be comprehensive and might exclude some cases in which the function would return a false value Enablers The enabler functions in the JavaScript API include the...

Page 432: ...not within the NOFRAMES tag dom canArrange Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Bring to Front or Move to Back operation Arguments None Returns A Boolean val...

Page 433: ...3 Description Checks whether Dreamweaver can perform a Paste as Text operation Arguments None Returns A Boolean value true if the Clipboard contains any content that can be pasted into Dreamweaver as...

Page 434: ...eColspan Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Decrease Colspan operation Arguments None Returns A Boolean value true if the current cell has a COLSPAN attrib...

Page 435: ...ow Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Delete Row operation Arguments None Returns A Boolean value true if the insertion point is inside a cell or if a cell...

Page 436: ...Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform an Increase Rowspan operation Arguments None Returns A Boolean value true if there are any cells below the current cell f...

Page 437: ...MakeNewEditableRegion Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a New Editable Region operation Arguments None Returns A Boolean value true if the current document...

Page 438: ...herwise dom canPlayPlugin Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Play operation This function is valid only for the active document Arguments None Returns A Bo...

Page 439: ...n perform a Select Table operation Arguments None Returns A Boolean value true if the insertion point or selection is within a table false otherwise dom canSetLinkHref Availability Dreamweaver 3 Descr...

Page 440: ...Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Split Frame Left Right Up Down operation Arguments None Returns A Boolean value true if the selection is within a frame...

Page 441: ...lug in false otherwise dom canUndo Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform an Undo operation Arguments None Returns A Boolean value true if any steps remain to un...

Page 442: ...e inserted or applied Returns either a true or false value so the menu items can be enabled or disabled for insertion or application Arguments None Returns Returns a Boolean value true if the selected...

Page 443: ...o the current document or the active window in the Site panel on the Macintosh a text field in a floating panel or dialog box false otherwise dreamweaver canDeleteSelection Availability Dreamweaver 3...

Page 444: ...n export the current document as XML Arguments None Returns A Boolean value true if you can perform an export on the current document false otherwise Example The following example calls dw canExportTe...

Page 445: ...reamweaver canPlayRecordedCommand Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Play Recorded Command operation Arguments None Returns A Boolean value true if there i...

Page 446: ...to the last saved version operation Arguments documentObject The documentObject argument is the object at the root of a document s DOM tree the value that the dreamweaver getDocumentDOM function retu...

Page 447: ...erform a Save As Template operation on the specified document Arguments documentObject The documentObject argument is the root of a document s DOM the same value that the dreamweaver getDocumentDOM fu...

Page 448: ...icates whether the document is a frameset dreamweaver canSelectAll Availability Dreamweaver 3 Description Checks whether Dreamweaver can perform a Select All operation Arguments None Returns A Boolean...

Page 449: ...id can display rules in locked files a return value of true does not guarantee that the rule can be modified Arguments None Returns A Boolean value true if the Property Grid editor can be applied to t...

Page 450: ...ted false otherwise dreamweaver cssStylePalette canDuplicateSelectedStyle Availability Dreamweaver MX Description Checks the current active document to see whether the selected style can be duplicated...

Page 451: ...in this document dreamweaver isRecording Availability Dreamweaver 3 Description Reports whether Dreamweaver is currently recording a command Arguments None Returns A Boolean value that indicates whet...

Page 452: ...r resultsPalette canCopy Availability Dreamweaver MX Description Checks whether the current Results window can display a copied message in its contents Arguments None Returns A Boolean value true if t...

Page 453: ...dreamweaver resultsPalette canOpenInBrowser Availability Dreamweaver MX Description Checks whether the current report can display in a browser Arguments None Returns A Boolean value true if the conte...

Page 454: ...ltsPalette canSelectAll Availability Dreamweaver MX Description Checks whether a Select All message can be sent to the window that is currently in focus Arguments None Returns A Boolean value true if...

Page 455: ...ity Dreamweaver 4 Description Opens all selected documents in a browser window It is the same as using the Preview in Browser command Arguments browserName The browserName argument is the name of a br...

Page 456: ...iteOrURL argument must be the site keyword which indicates that the function should act on the selection in the Site panel or the URL for a single file Returns A Boolean value true if the following co...

Page 457: ...d on for the site site canCloak Availability Dreamweaver MX Description Determines whether Dreamweaver can perform a Cloaking operation Arguments siteOrURL The siteOrURL argument must be the site keyw...

Page 458: ...gle file Returns If the argument is site a Boolean value that indicates whether one or more files or folders is selected in the Site panel and a remote site has been defined If the argument is a URL a...

Page 459: ...e that indicates whether both windows contain site files not the site map and whether the selection is in the opposite pane from the argument site canMakeEditable Availability Dreamweaver 3 Descriptio...

Page 460: ...URL argument must be the site keyword which indicates that the function should act on the selection in the Site panel or the URL for a single file Returns One of the following values If the argument i...

Page 461: ...ocalOrRemote argument is the local keyword otherwise a Boolean value that indicates whether a remote site has been defined site canRemoveLink Availability Dreamweaver 3 Description Checks whether Drea...

Page 462: ...3 Description Determines whether Dreamweaver can perform a Select Newer Remote Local operation Arguments localOrRemote The localOrRemote argument must be either the local or remote keyword Returns A B...

Page 463: ...e Site panel or the URL of a particular folder which indicates that the canUncloak function should act on the specified folder and all its contents Returns A Boolean value true if Dreamweaver can perf...

Page 464: ...canViewAsRoot Availability Dreamweaver 3 Description Determines whether Dreamweaver can perform a View as Root operation Arguments None Returns A Boolean value true if the specified file is an HTML o...

Page 465: ...nEdit 442 assetPalette canInsertOrApply 442 assetPalette copyToSite 294 assetPalette edit 295 assetPalette getSelectedCategory 295 assetPalette getSelectedItems 295 assetPalette getSelectedView 296 as...

Page 466: ...ecordedCommand 445 canPopupEditTagDialog 445 canPut 460 canRecreateCache 460 canRedo 438 446 canRefresh 461 canRemoveEditableRegion 439 canRemoveLink 461 canRevertDocument 446 canSave 454 canSaveAll 4...

Page 467: ...leSheet 451 cut 178 D Data Manager 329 data property of httpReply objects 43 database access functions 91 database API 77 access functions 91 connection functions 78 MMDB deleteConnection 78 MMDB getC...

Page 468: ...leUpdate 371 doesColumnHaveSpacer 364 doesGroupHaveSpacers 365 dom addBehavior 303 dom addSpacerToColumn 363 dom align 354 dom applyCharacterMarkup 389 dom applyCSSStyle 345 dom applyFontMarkup 389 do...

Page 469: ...getRulerUnits 357 dom getSelectedEditableRegion 320 dom getSelectedNode 279 dom getSelection 280 dom getShowAutoIndent 183 dom getShowFrameBorders 183 dom getShowGrid 184 dom getShowHeadView 184 dom...

Page 470: ...getServerInfo 341 dom serverModel getServerLanguage deprecated 342 dom serverModel getServerName 342 dom serverModel getServerSupportsCharset 343 dom serverModel getServerVersion 343 dom serverModel t...

Page 471: ...lettes 362 dreamweaver assetPalette addToFavoritesFromDocume nt 293 dreamweaver assetPalette addToFavoritesFromSiteAsset s 294 dreamweaver assetPalette addToFavoritesFromSiteWin dow 294 dreamweaver as...

Page 472: ...tte getSelectedTarget 351 dreamweaver cssStylePalette getStyles 351 dreamweaver cssStylePalette newStyle 352 dreamweaver cssStylePalette setMediaType 352 dreamweaver cssStylePallette canEditStyleSheet...

Page 473: ...mweaver libraryPalette deleteSelectedItem 300 dreamweaver libraryPalette getSelectedItem 300 dreamweaver libraryPalette newFromDocument 300 dreamweaver libraryPalette recreateFromDocument 301 dreamwea...

Page 474: ...g 335 dreamweaver showPreferencesDialog 151 dreamweaver showProperties 216 dreamweaver showQuickTagEditor 407 dreamweaver showReportsDialog 219 dreamweaver showResults 172 dreamweaver showTagChooser 1...

Page 475: ...tes 41 DWfile write 42 file manipulation functions 252 FilePathToLocalURL 57 files snippets 323 files on disk copying 34 creating HTML files 255 creating non HTML files 42 creating XHTML files 256 cre...

Page 476: ...Content 182 getElementRef 271 getErrorMessage 115 getEvents 112 getExtDataArray 330 getExtDataValue 329 getExtensionEditorList 142 getExternalTextEditor 143 getExtGroups 330 getExtParticipants 330 get...

Page 477: ...ShowHiddenFiles 199 getShowImageMaps 185 getShowInvalidHTML 184 getShowInvisibleElements 185 getShowLayerBorders 185 getShowLayoutTableTabs 365 getShowLayoutView 366 getShowLineNumbers 186 getShowNosc...

Page 478: ...p postText 48 MMHttp postTextCallback 49 I image map functions 354 importDTDOrSchema 428 importSite 234 importXMLIntoTemplate 260 include files connection type definition 109 generated 108 increaseCol...

Page 479: ...nfo 86 MMDB needToRefreshColdFusionDsnList 87 MMDB popupConnection 87 MMDB setRdsPassword 88 MMDB setRdsUserName 88 MMDB showColdFusionAdmin 88 MMDB showConnectionMgrDialog 89 MMDB showOdbcDialog 89 M...

Page 480: ...popupConnection 87 popupEditTagDialog 426 popupInsertTagDialog 425 popupServerBehavior 337 postText 48 postTextCallback 49 preview attribute 323 previousParagraph 168 previousWord 168 419 PrintCode 40...

Page 481: ...saveDocumentAsTemplate 265 saveFrameset 266 saveFramesetAs 266 saveSitesToPrefs 220 scanSourceString 288 scrollEndFile 420 scrollLineDown 420 scrollLineUp 420 scrollPageDown 421 scrollPageUp 421 scro...

Page 482: ...setRdsPassword 88 setRdsUserName 88 setRulerOrigin 359 setRulerUnits 359 setSelectedBehavior 311 setSelectedNode 282 setSelectedSteps 160 setSelection 245 282 285 setShowDependents 200 setShowFrameBo...

Page 483: ...he 460 site canRefresh 461 site canRemoveLink 461 site canSelectAllCheckedOutFiles 462 site canSelectNewer 462 site canSetLayout 461 site canSynchronize 463 site canUncloak 463 site canUndoCheckOut 46...

Page 484: ...134 SCS_canCheckout 133 SCS_canConnect 133 SCS_canDelete 135 SCS_canGet 133 SCS_canNewFolder 135 SCS_canPut 134 SCS_canRename 136 SCS_CanUndoCheckout 135 SCS_Checkin 127 SCS_Checkout 127 SCS_Connect...

Page 485: ...tAppServer 344 testConnection 90 tileHorizontally 216 tileVertically 216 toggle functions 182 toggleFloater 217 toolbar functions 202 topPage 423 translation functions 290 type attribute 323 U uncloak...

Page 486: ...486 Index...

Reviews: