Detailed instructions for use are in the User's Guide.
[. . . ] Dreamweaver API Reference
Trademarks Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware, Authorware Star, Backstage, Bright Tiger, Clustercats, Cold Fusion, Contribute, Design in Motion, Director, Dream Templates, Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Flash, Macromedia M Logo & Design, Macromedia Spectra, Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame!, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] A
value of true enables cloaking for the current site; a value of false disables cloaking for the current site.
242
Chapter 13: Site
Returns
None. site. setConnectionState()
Availability
Dreamweaver 3.
Description
Sets the connection state of the current site.
Arguments bConnected
· The bConnected argument is a Boolean value that indicates if there is a connection (true) or
not (false) to the current 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 defined site (as it appears in the Current Sites list in
the Site panel or the Edit Sites dialog box).
Returns
Nothing.
Example
If three sites are defined (for example, avocado8, dreamcentral, and testsite), a call to site. setCurrentSite("dreamcentral"); makes dreamcentral the current site.
Site functions
243
site. setFocus()
Availability
Dreamweaver 3.
Description
Gives focus to a specified pane in the Site panel. If the specified pane is not showing, this function displays the pane and gives it focus.
Arguments whichPane
· The whichPane argument must be one of the following strings: "local", "remote", or
"site map". site. setLayout()
Availability
Dreamweaver 3.
Description
Opens the Site Map Layout pane in the Site Definition dialog box.
Arguments
None.
Returns
Nothing.
Enabler
"site. canSetLayout()" on page 461. site. setLinkVisibility()
Availability
Dreamweaver 3.
Description
Shows or hides the current link.
Arguments bShow
· The bShow argument is a Boolean value that indicates whether to remove the Hidden
designation from the current link.
244
Chapter 13: Site
Returns
Nothing. site. setSelection()
Availability
Dreamweaver 3.
Description
Selects files or folders in the active pane in the Site panel.
Arguments arrayOfURLs
· The arrayOfURLs 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. site. synchronize()
Availability
Dreamweaver 3.
Description
Opens the Synchronize Files dialog box.
Arguments
None.
Returns
Nothing.
Enabler
"site. canSynchronize()" on page 463.
Site functions
245
site. uncloak()
Availability
Dreamweaver MX.
Description
Uncloaks the current selection in the Site panel or the specified folder.
Arguments siteOrURL
· The siteOrURL argument must contain one of the following values:
The keyword "site", which indicates that the unCloak() 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.
Enabler
"site. canUncloak()" on page 463. site. uncloakAll()
Availability
Dreamweaver MX.
Description
Uncloaks all folders in the current site and deselects the Cloak Files Ending With: checkbox in the Cloaking settings.
Arguments
Nothing.
Returns
Nothing.
Enabler
"site. canUncloak()" on page 463.
246
Chapter 13: Site
site. undoCheckOut()
Availability
Dreamweaver 3.
Description
Removes the lock files that are associated with the specified files from the local and remote sites, and replaces the local copy of the specified files with the remote 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
Nothing.
Enabler
"site. canUndoCheckOut()" on page 463. site. viewAsRoot()
Availability
Dreamweaver 3.
Description
Temporarily moves the selected file to the top position in the site map.
Arguments
None.
Returns
Nothing.
Enabler
"site. canViewAsRoot()" on page 464.
Site functions
247
248
Chapter 13: Site
CHAPTER 14 Document
The Document functions in Macromedia Dreamweaver MX 2004 perform operations that affect the document on which the user is working. These functions perform tasks that convert tables to layers, run a command in the Configuration/Commands folder, browse for a file URL, check spelling or set page properties, convert a relative URL 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 tables, and cascading style sheets (CSS) to HTML markup. Each function exactly duplicates the behavior of one of the conversion commands in the File or Modify menu. dom. convertLayersToTable()
Availability
Dreamweaver 3.
Description
Opens the Convert Layers to Table dialog box.
Arguments
None.
Returns
Nothing.
Enabler
"dom. canConvertLayersToTable()" on page 433.
249
dom. convertTablesToLayers()
Availability
Dreamweaver 3.
Description
Opens the Convert Tables to Layers dialog box.
Arguments
None.
Returns
Nothing.
Enabler
"dom. canConvertTablesToLayers()" on page 434.
Command functions
Command functions help you make the most of the files in the Configuration/Commands folder. They manage the Command menu and call commands from other types of extension files. dreamweaver. editCommandList()
Availability
Dreamweaver 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().
Description
This function executes the specified command. To the user, the effect is the same as selecting the command from a menu; if a dialog box is associated with the command, it appears. This function provides the ability to call a command from another extension file. It blocks other edits until the user closes the dialog box.
Note: This function can be called within the objectTag() function, from any script in a command file, or from the Property inspector file.
250
Chapter 14: Document
Arguments commandFile
· The commandFile argument is the name of a command file within the Configuration/
Commands folder (for example, "Format Table. htm").
Returns
Nothing. dreamweaver. runCommand()
Availability
Dreamweaver 3.
Description
Executes the specified command; it works the same as selecting the command from a menu. If a dialog box is associated with the command, it appears and the command script blocks other edits until the user closes the dialog box. This function provides the ability to call a command from 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. [. . . ] dreamweaver. snippetpalette. canEditSnippet()
Availability
Dreamweaver MX.
Description
Checks whether you can edit the currently selected item and returns either a true or false value so you can enable or disable menu items for editing.
Arguments
None.
Returns
A Boolean value: true if you can edit the currently selected item; false otherwise.
454
Chapter 19: Enablers
dreamweaver. snippetpalette. canInsert()
Availability
Dreamweaver MX.
Description
Checks whether you can insert or apply the selected element and returns either a true or false value so you can enable or disable menu items for inserting or applying.
Arguments
None.
Returns
A Boolean value: true if you can insert or apply the selected element; false otherwise. site. browseDocument()
Availability
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 browser as defined in the Preview in Browser
preferences. If omitted, this argument defaults to the user's primary browser.
Returns
Nothing. [. . . ]