MACROMEDIA DREAMWEAVER MX 2004-DREAMWEAVER API Reference

Summary of DREAMWEAVER MX 2004-DREAMWEAVER API

  • Page 1

    Dreamweaver api reference 000_dw_api_print.Book page 1 wednesday, august 20, 2003 9:14 am.

  • Page 2

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

  • Page 3: Contents

    3 contents chapter 1: introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 extending dreamweaver . . . . . . . . . . . . . . . ....

  • Page 4

    4 contents dwfile.Setattributes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 dwfile.Write() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 chapter 3: the http api . . . . . . . . . . . . . . . . . . ....

  • Page 5

    Contents 5 chapter 6: flash integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 how flash elements work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 inserting flash elements . . . . . . . . . . . . . . . . . . . . ....

  • Page 6

    6 contents mmdb.Getspparameters() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 mmdb.Getspparamsasstring() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 mmdb.Gettables() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 7

    Contents 7 bool scs_undocheckout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 int scs_getnumcheckedout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 bool scs_getfilecheckoutlist() . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 8

    8 contents dreamweaver.Showdynamicdatadialog() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 dreamweaver.Showpreferencesdialog() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 dreamweaver.Showtagchooser() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 9

    Contents 9 menu functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 dreamweaver.Getmenuneedsupdating() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 dreamweaver.Notifymenuupdated() . . . . . . . . . . . . . . . . . . . . . ...

  • Page 10

    10 contents dom.Setshowframeborders() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 dom.Setshowgrid() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 dom.Setshowheadview() . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 11

    Contents 11 window functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 dom.Getfocus(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 dom.Getview() . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 12

    12 contents site.Getappserverpathtofiles() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 site.Getappurlprefixforsite() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 site.Getcheckoutuser() . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 13

    Contents 13 chapter 14: document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 conversion functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 dom.Convertlayerstotable() . . . . . . . . . . . . . . . . . . ....

  • Page 14

    14 contents dreamweaver.Getobjecttags() (deprecated) . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 dreamweaver.Getpreferenceint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 dreamweaver.Getpreferencestring() . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 15

    Contents 15 dreamweaver.Assetpalette.Locateinsite() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 dreamweaver.Assetpalette.Newasset(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 dreamweaver.Assetpalette.Newfolder(). . . . . . . . . . . . . . . . . . . . . . ....

  • Page 16

    16 contents dom.Getislibrarydocument() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 dom.Getistemplatedocument() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 dom.Getselectededitableregion() . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 17

    Contents 17 dom.Servermodel.Getserverextension() (deprecated). . . . . . . . . . . . . . . . . . . . 340 dom.Servermodel.Getserverincludeurlpatterns(). . . . . . . . . . . . . . . . . . . . . . . 340 dom.Servermodel.Getserverinfo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 18

    18 contents dom.Settracingimageposition(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 dom.Settracingimageopacity(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 dom.Snaptracingimagetoselection() . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 19

    Contents 19 chapter 18: code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 code functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 dreamweaver.Codehints.Addmenu() . . . . . . . . . . . ...

  • Page 20

    20 contents dom.Settextalignment() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 dom.Settextfieldkind() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 dom.Settextformat() . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 21

    Contents 21 dom.Source.Scrolllineup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 dom.Source.Scrollpagedown(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 dom.Source.Scrollpageup() . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 22

    22 contents dom.Cansetlinkhref() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 dom.Canshowlistpropertiesdialog(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 dom.Cansplitframe() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

  • Page 23

    Contents 23 site.Cancheckin() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 site.Cancheckout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 site.Cancloak() . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 24

    24 contents 000_dw_api_print.Book page 24 wednesday, august 20, 2003 9:14 am.

  • Page 25: Chapter 1

    25 chapter 1 introduction the dreamweaver api reference describes two application programming interfaces (apis) that let you perform various supporting tasks when developing macromedia dreamweaver mx 2004 extensions and adding program code to your dreamweaver web pages. These two apis are the utilit...

  • Page 26

    26 chapter 1: introduction background this book assumes that you are familiar with dreamweaver, html, xml, javascript programming and, if applicable, c programming. If you are writing extensions for building web applications, you should also be familiar with server-side scripting on at least one pla...

  • Page 27

    Removed functions 27 document the following new global document functions have been added to the document chapter. Global document • “dom.Hideinfomessagepopup()” on page 268 • “dreamweaver.Showtargetbrowsersdialog()” on page 276 • “dom.Showinfomessagepopup()” on page 269 design the following new css...

  • Page 28

    28 chapter 1: introduction page content in the page content chapter, the following timeline functions have been removed: timeline functions • dreamweaver.Timelineinspector.Addbehavior() • dreamweaver.Timelineinspector.Addframe() • dreamweaver.Timelineinspector.Addkeyframe() • dreamweaver.Timelineins...

  • Page 29

    Removed functions 29 code in the code chapter, the following javascript debugger and tag inspector functions have been removed: js debugger functions • dreamweaver.Debugdocument() • dreamweaver.Startdebugger() • dreamweaver.Getisanybreakpoints() • dreamweaver.Removeallbreakpoints() tag inspector fun...

  • Page 30

    30 chapter 1: introduction the extending dreamweaver book is designed to serve the user who wants to learn how to build a dreamweaver extension. The dreamweaver api reference is designed to serve the experienced dreamweaver programmer who wants to quickly locate the right function to accomplish a pa...

  • Page 31: Part I

    Part i utility apis learn about the macromedia dreamweaver mx 2004 utility functions that you can use to access local and web-based files, work with macromedia fireworks mx 2004, and macromedia flash mx 2004 objects, manage database connections, create new database connection types, access javabeans...

  • Page 32

    000_dw_api_print.Book page 32 wednesday, august 20, 2003 9:14 am.

  • Page 33: Chapter 2

    33 chapter 2 the file i/o api macromedia dreamweaver mx 2004 includes a c shared library called dwfile, which gives authors of objects, commands, behaviors, data translators, floating panels, and property inspectors the ability to read and write files on the local file system. This chapter describes...

  • Page 34

    34 chapter 2: the file i/o api dwfile.Copy() availability dreamweaver 3. Description this function copies the specified file to a new location. Arguments originalurl , copyurl • the originalurl argument, which is expressed as a file:// url, is the file you want to copy. • the copyurl argument, which...

  • Page 35

    The file i/o api 35 dwfile.Exists() availability dreamweaver 2. Description this function tests for the existence of the specified file. Arguments fileurl • the fileurl argument, which is expressed as a file:// url, is the requested file. Returns a boolean value: true if the file exists; false other...

  • Page 37

    The file i/o api 37 dwfile.Getcreationdate() availability dreamweaver 4. Description this function gets the time when the file was created. Arguments fileurl • the fileurl argument, which is expressed as a file:// url, is the file for which you are checking the creation time. Returns a string that c...

  • Page 38

    38 chapter 2: the file i/o api dwfile.Getmodificationdateobj() availability dreamweaver mx. Description this function gets the javascript date object that represents the time when the file was last modified. Arguments fileurl • the fileurl argument, which is expressed as a file:// url, is the file f...

  • Page 39

    The file i/o api 39 arguments folderurl, {constraint} • the folderurl argument is the folder for which you want a contents list, which is expressed as a file:// url, plus an optional wildcard file mask. Valid wildcards are asterisks (*), which match one or more characters, and question marks (?), wh...

  • Page 40

    40 chapter 2: the file i/o api dwfile.Remove() availability dreamweaver 3. Description this function moves the specified file to the recycling bin or trash. Arguments fileurl • the fileurl argument, which is expressed as a file:// url, is the file you want to remove. Returns a boolean value: true va...

  • Page 41

    The file i/o api 41 dwfile.Setattributes() availability dreamweaver mx. Description this function sets the system-level attributes of a particular file. Arguments fileurl , strattrs • the fileurl argument, which is expressed as a file:// url, identifies the file for which you are setting the attribu...

  • Page 42

    42 chapter 2: the file i/o api dwfile.Write() availability dreamweaver 2. Description this function writes the specified string to the specified file. If the specified file does not yet exist, it is created. Arguments fileurl , text , {mode} • the fileurl argument, which is expressed as a file:// ur...

  • Page 43: Chapter 3

    43 chapter 3 the http api extensions are not limited to working within the local file system. Macromedia dreamweaver mx 2004 provides a mechanism to get information from and send information to a web server by using hypertext transfer protocol (http). This chapter describes the http api and how to u...

  • Page 44

    44 chapter 3: the http api the http api this section details the functions that are methods of the mmhttp object. Mmhttp.Clearserverscriptsfolder() availability dreamweaver mx. Description deletes the _mmserverscripts folder—and all its files—under the root folder for the current site, which can be ...

  • Page 45

    The http api 45 mmhttp.Cleartemp() description this function deletes all the files in the configuration/temp folder, which is located in the dreamweaver application folder. Arguments none. Returns nothing. Example the following code, when saved in a file within the configuration/shutdown folder, rem...

  • Page 46

    46 chapter 3: the http api returns an object that represents the reply from the server. The data property of this object is a string that contains the location where the file is saved, which is expressed as a file:// url. Normally, the statuscode property of the object contains the status code that ...

  • Page 47

    The http api 47 mmhttp.Getfilecallback() description this function gets the file at the specified url, saves it in the configuration/temp folder inside the dreamweaver application folder, and then calls the specified function with the request id and reply result. When saving the file locally, dreamw...

  • Page 48

    48 chapter 3: the http api • the serverscriptsfolder argument is an optional string that names a particular folder— relative to the configuration folder on the application server—from which you want to retrieve server scripts. To retrieve the scripts, dreamweaver uses the appropriate transfer protoc...

  • Page 49

    The http api 49 • the datatopost argument is the data to post. If the third argument is "application/x-www- form-urlencoded" or omitted, datatopost must be form-encoded according to section 8.2.1 of the rfc 1866 specification (available at www.Faqs.Org/rfcs/rfc1866.Html ). • the contenttype argument...

  • Page 50

    50 chapter 3: the http api • the datatopost argument is the data to be posted. If the third argument is "application/x- www-form-urlencoded" or omitted, data must be form-encoded according to section 8.2.1 of the rfc 1866 specification (available at www.Faqs.Org/rfcs/rfc1866.Html ). • the contenttyp...

  • Page 51: Chapter 4

    51 chapter 4 the design notes api macromedia dreamweaver mx 2004, macromedia fireworks mx 2004, and macromedia flash mx 2004 give web designers and developers a way to store and retrieve extra information about documents—information such as review comments, change notes, or the source file for a gif...

  • Page 52

    52 chapter 4: the design notes api the design notes javascript api all functions in the design notes javascript api are methods of the mmnotes object. Mmnotes.Close() description this function closes the specified design notes file and saves any changes. If all the key/value pairs are removed, dream...

  • Page 53

    The design notes javascript api 53 mmnotes.Get() description this function gets the value of the specified key in the specified design notes file. Arguments filehandle , keyname • the filehandle argument is the file handle that mmnotes.Open() returns. • the keyname argument is a string that contains...

  • Page 54

    54 chapter 4: the design notes api example the following code might be used in a custom floating panel to display the design notes information for the active document: var notehandle = mmnotes.Open(dw.Getdocumentdom().Url); var thekeys = mmnotes.Getkeys(notehandle); var notestring = ""; var thevalue...

  • Page 55

    The design notes javascript api 55 mmnotes.Getversionnum() description this function gets the version number of the mmnotes shared library. Arguments none. Returns a string that contains the version number. Mmnotes.Localurltofilepath() description this function converts the specified file:// url to ...

  • Page 56

    56 chapter 4: the design notes api mmnotes.Remove() description the function removes the specified key (and its value) from the specified design notes file. Arguments filehandle , keyname • the filehandle argument is the file handle that the mmnotes.Open() function returns. • the keyname argument is...

  • Page 57

    The design notes c api 57 the design notes c api in addition to the javascript api, the mmnotes shared library also exposes a c api that lets other applications create design notes files. It is not necessary to call these c functions directly if you use the mmnotes shared library in dreamweaver beca...

  • Page 58

    58 chapter 4: the design notes api bool getnote() description this function gets the value of the specified key in the specified design notes file. Arguments filehandle notehandle , const char keyname[64] , char* valuebuf , int valuebuflength • the notehandle argument is the file handle that the ope...

  • Page 59

    The design notes c api 59 int getnoteskeycount() description this function gets the number of key/value pairs in the specified design notes file. Arguments filehandle notehandle • the notehandle argument is the file handle that the opennotesfile() function returns. Returns an integer that represents...

  • Page 60

    60 chapter 4: the design notes api bool getsiterootforfile() description this function determines the site root for the specified design notes file. Arguments const char* filepath , char* siterootbuf , int siterootbufmaxlen , {infoprefs* infoprefs} • the filepath argument is the file://url of the fi...

  • Page 61

    The design notes c api 61 bool getversionnum() description this function gets the version number of the mmnotes shared library, which lets you determine whether certain functions are available. Arguments char* versionnumbuf , int versionnumbufmaxlen • the versionnumbuf argument is the buffer where t...

  • Page 62

    62 chapter 4: the design notes api filehandle opennotesfilewithopenflags() description this function opens the design notes file that is associated with the specified file or creates one if none exists. You can open the file in read-only mode. Arguments const char* localfileurl , {bool bforcecreate}...

  • Page 63: Chapter 5

    63 chapter 5 fireworks integration fwlaunch is a c shared library that gives authors of objects, commands, behaviors, and property inspectors the ability to communicate with macromedia fireworks mx 2004. Using fwlaunch, you write javascript to open the fireworks user interface (ui) and provide comma...

  • Page 64

    64 chapter 5: fireworks integration fwlaunch.Bringfwtofront() availability dreamweaver 3, fireworks 3. Description this function brings fireworks to the front if it is running. Arguments none. Returns nothing. Fwlaunch.Execjsinfireworks() availability dreamweaver 3, fireworks 3. Description this fun...

  • Page 65

    The fwlaunch api 65 fwlaunch.Getjsresponse() availability dreamweaver 3, fireworks 3. Description this function determines whether fireworks is still executing the javascript passed to it by the fwlaunch.Execjsinfireworks() function, whether the script completed successfully, or whether an error occ...

  • Page 66

    66 chapter 5: fireworks integration // got a valid response! Alert("nice to meet you, " + response); window.Close(); } doneflag = true; } } } fwlaunch.Maylaunchfireworks() availability dreamweaver 2, fireworks 2. Description this function determines whether it is possible to open a fireworks optimiz...

  • Page 67

    The fwlaunch api 67 returns zero, if a fireworks optimization session successfully opens for the specified image; otherwise, a nonzero error code that indicates one of the following errors occurred: • invalid usage, which indicates that the docurl argument, the imageurl argument, or both, are specif...

  • Page 68

    68 chapter 5: fireworks integration a simple fwlaunch communication example the following command asks fireworks to prompt the user for their name and returns the name to dreamweaver: charset=iso-8859-1"> function commandbuttons(){ return new array("prompt", "promptinfireworks()", "cancel", ¬ "ready...

  • Page 69

    The fwlaunch api 69 window.Close(); alert("cancel clicked"); } else { // we're still going, ask fireworks how it's doing if (gprogresstrackercookie != null) response = ¬ fwlaunch.Getjsresponse(gprogresstrackercookie); if (response == null) { // still waiting for a response, call us again in 1/2 a //...

  • Page 70

    70 chapter 5: fireworks integration 000_dw_api_print.Book page 70 wednesday, august 20, 2003 9:14 am.

  • Page 71: Chapter 6

    71 chapter 6 flash integration macromedia dreamweaver mx 2004 now provides support for macromedia flash xm 2004 elements as well as continuing support for the flash object api, which leverages the flash generator template file to create new flash objects. This chapter describes ways of working with ...

  • Page 72

    72 chapter 6: flash integration adding a flash element to the insert bar as with other objects, you add a flash element to the insert bar using the button tag. However, a button tag for a flash element must have both file and command attributes to add the element successfully to the document (see th...

  • Page 73

    The flash objects api 73 swffile.Createfile() description this function generates a new flash object file with the specified template and array of parameters. It also creates a gif, png, jpeg, and mov version of the title if filenames for those formats are specified. If you want to specify an option...

  • Page 74

    74 chapter 6: flash integration returns a string that contains one of the following values: • "noerror" means the call completed successfully. • "invalidtemplatefile" means the specified template file is invalid or not found. • "invalidoutputfile" means at least one of the specified output filenames...

  • Page 75

    The flash objects api 75 swffile.Getobjecttype() description this function returns the flash object type; the value that passed in the dwtype parameter when the swffile.Createfile() function created the file. Arguments filename • the filename argument, which is expressed as a file:// url, is a path ...

  • Page 76

    76 chapter 6: flash integration 000_dw_api_print.Book page 76 wednesday, august 20, 2003 9:14 am.

  • Page 77: Chapter 7

    77 chapter 7 the database api functions in the database api let you manage database connections and access information that is stored in databases. The database api is divided by two distinct purposes: managing and accessing database connections. In managing database connections, you can get the use...

  • Page 78

    78 chapter 7: the database api if (ss.Paramarray != null) { for (var i = 0; i pa[i] = new array(); pa[i][0] = ss.Paramarray[i].Name; pa[i][1] = ss.Paramarray[i].Value; } } var statement = replaceparamswithvals(statement, pa, servermodel); } bindingsandtypearray = mmdb.Getcolumnandtypelist(connname, ...

  • Page 79

    Database connection functions 79 mmdb.Getcoldfusiondsnlist() availability dreamweaver ultradev 4. Description this function gets the coldfusion data source names (dsns) from the site server, using the getrdsusername() and getrdspassword() functions. Arguments none. Returns an array that contains the...

  • Page 80

    80 chapter 7: the database api note: these properties are the standard ones that dreamweaver implements. Developers can define their connection types and add new properties to this standard set or provide a different set of properties. Mmdb.Getconnectionlist() availability dreamweaver ultradev 1. De...

  • Page 81

    Database connection functions 81 • connection 1 has the following properties: connectionstring="jdbc:inetdae:velcro-qa-5:1433?Database=pubs" drivername="com.Inet.Tds.Tdsdriver" • connection 2 has the following properties: connectionstring="jdbc:inetdae:velcro-qa-5:1433?Database=pubs" drivername="com...

  • Page 82

    82 chapter 7: the database api example the code var connectionstring = mmdb.Getconnectionstring ("empdb") returns different strings for an ado or jdbc connection. • for an ado connection, the following string can return: "dsn=empdb;uid=;pwd="; • for a jdbc connection, the following string can return...

  • Page 83

    Database connection functions 83 in summary, dreamweaver ultradev 4 developers need to add a new entry to the xml, and dreamweaver mx (or later), developers need to implement a new dialog box. Description this function gets jdbc drivers and respective url templates. Arguments none. Returns an array ...

  • Page 84

    84 chapter 7: the database api mmdb.Getrdspassword() availability dreamweaver ultradev 4. Description this function gets the remote development services (rds) password (for use with coldfusion connections). Arguments none. Returns a string that contains the rds password. Mmdb.Getrdsusername() availa...

  • Page 85

    Database connection functions 85 • the urlparams argument, which is optional, is a string that contains a list of name=value expressions, which are separated by ampersand (&) characters. You must not enclose values with quotes. Some characters, such as the space in the value hello world , need to be...

  • Page 86

    86 chapter 7: the database api arguments connname • the connname 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. Returns a user name string that is associat...

  • Page 87

    Database connection functions 87 mmdb.Needtorefreshcoldfusiondsnlist() availability dreamweaver mx. Description this function tells the connection manager to empty the cache and get the coldfusion data source list from the application server the next time a user requests the list. Arguments none. Re...

  • Page 88

    88 chapter 7: the database api • the connrec argument is a reference to an existing connection object. • the bduplicate argument is a boolean value. Returns nothing. The defined connection dialog box appears. Mmdb.Setrdspassword() availability dreamweaver ultradev 4. Description this function sets t...

  • Page 89

    Database connection functions 89 returns nothing. The coldfusion administrator dialog box appears. Mmdb.Showconnectionmgrdialog() availability dreamweaver ultradev 1. Description this function displays the connection manager dialog box. Arguments nothing. Returns nothing. The connection manager dial...

  • Page 90

    90 chapter 7: the database api returns an object that contains the new values in the username and password properties. If either property is not defined, it indicates that the user cancelled the dialog box. Mmdb.Showrestrictdialog() availability dreamweaver ultradev 4. Description this function disp...

  • Page 91

    Database access functions 91 database access functions database access functions let you query a database. For the collection of functions that manage a database connection, see “database connection functions” on page 78 . The following list describes some of the arguments that are common to the fun...

  • Page 92

    92 chapter 7: the database api mmdb.Getcolumnlist() availability dreamweaver ultradev 1. Description this function gets a list of columns from an executed sql select statement. Arguments connname, statement • the connname argument is a connection name that is specified in the connection manager. It ...

  • Page 93

    Database access functions 93 returns an array of objects, one object for each column. Each object defines the following three properties for the column with which it is associated. Example the following example uses mmdb.Getcolumns() to set the tooltip text value: var columnnameobjs = mmdb.Getcolumn...

  • Page 94

    94 chapter 7: the database api example the statement mmdb.Getcolumnsoftable ("empdb","employees"); returns the following strings: ["empid", "firstname", "lastname"] mmdb.Getprimarykeys() availability dreamweaver mx. Description this function returns the column names that combine to form the primary ...

  • Page 95

    Database access functions 95 returns an array of procedure objects where each procedure object has the following set of three properties: example the following code gets a list of procedures: var procobjects = mmdb.Getprocedures(connectionname); for (i = 0; i { var thisprocedure = procobjects[i] thi...

  • Page 96

    96 chapter 7: the database api mmdb.Getspcolumnlist() availability dreamweaver ultradev 1. Description this function gets a list of result set columns that are generated by a call to the specified stored procedure. Arguments connname, statement, paramvaluesarray • the connname argument is a connecti...

  • Page 97

    Database access functions 97 arguments connname, statement, paramnamearray, paramvaluesarray • the connname 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. ...

  • Page 98

    98 chapter 7: the database api returns an array of parameter objects, each specifying the following set of properties: example the following example retrieves the parameter objects for the specified procedure and creates a tooltip for each object using its properties. Var paramnameobjs = mmdb.Getspp...

  • Page 99

    Database access functions 99 example the code mmdb.Getspparamsasstring ("empdb","getnewemployeesmakingatleast") can return a string of form name startdate;direction:in;datatype:date, salary;direction:in;datatype:integer . In this example, the stored procedure, getnewemployeesmakingatleast , has two ...

  • Page 100

    100 chapter 7: the database api arguments connname • the connname 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. Returns an array of view objects where eac...

  • Page 101

    Database access functions 101 example the following code displays the results of the executed sql statement: mmdb.Showresultset("empdb","select empname,empfirstname,age ¬ from employees") mmdb.Showspresultset() availability dreamweaver ultradev 1. Description this function displays a dialog box that...

  • Page 102

    102 chapter 7: the database api mmdb.Showspresultsetnamedparams() availability dreamweaver ultradev 1. Description this function displays a dialog box that contains the result set of the specified stored procedure. The dialog box displays a tabular grid in which the header provides column informatio...

  • Page 103: Chapter 8

    103 chapter 8 the database connectivity api as a developer, you can create new connection types and corresponding dialog boxes for new or existing server models for macromedia dreamweaver mx 2004. Then, when a user sets up a site to start building pages, he or she creates a new connection object aft...

  • Page 104

    104 chapter 8: the database connectivity api the configuration/servermodels folder has html files that define each server model. Inside each html file is the getservermodelfoldername() function, which returns the name of the folder that is associated with the server model. The following example show...

  • Page 105

    The connection api 105 the connection api to create a new type of connection, including the dialog box with which users interact, you must implement the following three functions: findconnection() , inspectconnection() , and applyconnection() . You write these three functions and include them in the...

  • Page 106

    106 chapter 8: the database connectivity api the htmlsource argument is the html source for a connection. Returns a connection object that provides values for a particular combination of the properties that are listed in the following table. The properties for which this function returns a value dep...

  • Page 107

    The connection api 107 inspectconnection() availability dreamweaver ultradev 4. Description dreamweaver calls this function to initialize the dialog box data for defining a connection when the user edits an existing connection. This process lets dreamweaver populate the dialog box with the appropria...

  • Page 108

    108 chapter 8: the database connectivity api the generated include file the include file that applyconnection() generates declares all the properties of a connection.The filename for the include file is the connection name and has the file extension that is defined for the server model associated wi...

  • Page 109

    The definition file for your connection type 109 the server behavior file includes this connection by using the cfinclude statement, as shown in the following example: jsp the jsp include file should be named myconnection1.Jsp, where myconnection1 is the name of your connection. The following exampl...

  • Page 110

    110 chapter 8: the database connectivity api note: if you change the format of your include file or define an include file for a new server model, you need to map the connection parameters with the dreamweaver ui, live data, and preview in browser. The following sample edml file, which is associated...

  • Page 111: Chapter 9

    111 chapter 9 the javabeans api this chapter explains the apis for javabeans; the mmjb*() functions are javascript hooks that invoke java introspection calls for javabeans support. These functions get class names, methods, properties, and events from the javabeans, which can appear in the dreamweave...

  • Page 112

    112 chapter 9: the javabeans api arguments packagename.Pathname • the packagename.Pathname argument is the path to the package. It must be a java jar or zip java archive (for example, c:/jdbcdrivers/una2000_enterprise.Zip) . Returns a string array of class names inside the particular jar or zip java...

  • Page 113

    The javabeans api 113 mmjb.Getindexedproperties() availability dreamweaver ultradev 4, enhanced in dreamweaver mx. Description introspects the javabeans class and returns its indexed properties, which are design patterns that behave the same way as collections. Arguments packagename.Classname , { pa...

  • Page 114

    114 chapter 9: the javabeans api mmjb.Getproperties() availability dreamweaver ultradev 4, enhanced in dreamweaver mx. Description introspects the javabeans class and returns its properties. Arguments packagename.Classname , { packagepath } • the packagename.Classname argument is the name of the cla...

  • Page 115

    The javabeans api 115 mmjb.Getwriteproperties() availability dreamweaver mx. Description gets write-only properties for javabeans that support set method calls. Arguments packagename.Classname, { packagepath } • the packagename.Classname argument is the name of the class. The class must reside in a ...

  • Page 116

    116 chapter 9: the javabeans api 000_dw_api_print.Book page 116 wednesday, august 20, 2003 9:14 am.

  • Page 117: Chapter 10

    117 chapter 10 the source control integration api the source control integration api lets you write shared libraries to extend the macromedia dreamweaver mx 2004 check in/check out feature using source control systems (such as sourcesafe or cvs). Your libraries must support a minimum set of api func...

  • Page 118

    118 chapter 10: the source control integration api the source control system can optionally support design notes and check in/check out. The dreamweaver user enables design notes in source control systems by selecting the design notes tab in the edit sites dialog box and checking the box that enable...

  • Page 119

    The source control integration api required functions 119 returns a boolean value: true if successful; false otherwise. Bool scs_connect() description this function connects the user to the source control system. If the dll does not have log-in information, the dll must display a dialog box to promp...

  • Page 120

    120 chapter 10: the source control integration api int scs_getrootfolderlength() description this function returns the length of the name of the root folder. Arguments void *connectiondata • the connectiondata argument is a pointer to the agent’s data that passed into dreamweaver during the connect(...

  • Page 121

    The source control integration api required functions 121 bool scs_getfolderlist() description this function returns a list of files and folders in the passed-in folder, including pertinent information such as modified date, size, and whether the item is a folder or file. Arguments void *connectiond...

  • Page 122

    122 chapter 10: the source control integration api bool scs_get() description this function gets a list of files or folders and stores them locally. Arguments void *connectiondata , const char * remotepathlist[] , const char *localpathlist[] , const int numitems • the connectiondata argument is a po...

  • Page 123

    The source control integration api required functions 123 • the remotepath argument is the full path of the remote folder that the dll creates. Returns a boolean value: true if successful; false otherwise. Bool scs_delete() description this function deletes a list of files or folders from the source...

  • Page 124

    124 chapter 10: the source control integration api bool scs_itemexists() description this function determines whether a file or folder exists on the server. Arguments void *connectiondata , const char * remotepath • the connectiondata argument is a pointer to the agent’s data that passed into dreamw...

  • Page 125

    The source control integration api optional functions 125 bool scs_sitedeleted() description this function notifies the dll that the site has been deleted or that the site is no longer tied to this source control system. It indicates that the source control system can delete its persistent informati...

  • Page 126

    126 chapter 10: the source control integration api bool scs_getnewfeatures() description this function returns a list of menu items to add to the dreamweaver main and context menus. For example, the sourcesafe dll can add history and file differences to the main menu. Arguments char menuitemlist[][3...

  • Page 127

    The source control integration api optional functions 127 bool scs_checkin() description this function checks a list of local files or folders into the source control system. The dll is responsible for making the file read-only. If it is unsupported by the source control system and this feature is e...

  • Page 128

    128 chapter 10: the source control integration api bool scs_undocheckout() description this function undoes the check-out status of a list of files or folders. The dll is responsible for making the file read-only. If it is unsupported by the source control system and this feature is enabled by the u...

  • Page 129

    The source control integration api optional functions 129 bool scs_getfilecheckoutlist() description this function returns a list of users who have a file checked out. If the list is empty, no one has the file checked out. Arguments void *connectiondata , const char * remotepath , char checkoutlist[...

  • Page 130

    130 chapter 10: the source control integration api bool scs_geterrormessage() description this function returns the last error message. If you implement geterrormessage() , dreamweaver calls it each time one of your api functions returns the value false . If a routine returns -1 or false , it indica...

  • Page 131

    The source control integration api optional functions 131 arguments void *connectiondata , const char *remotepath • the connectiondata 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 th...

  • Page 132

    132 chapter 10: the source control integration api arguments void *connectiondata, const char *remotepath, const char keylist[][64], const char *valuelist[], bool showcolumnlist[], const int notecount, const int notelength • the connectiondata argument is a pointer to the agent’s data that passed in...

  • Page 133

    Enablers 133 enablers if the optional enablers are not supported by the source control system or the application is not connected to the server, dreamweaver determines when the menu items are enabled, based on the information it has about the remote files. Bool scs_canconnect() description this func...

  • Page 134

    134 chapter 10: the source control integration api returns a boolean value: true if successful; false otherwise. Bool scs_canput() description this function returns whether the put menu item should be enabled. Arguments void *connectiondata , const char * localpathlist[] , const char *remotepathlist...

  • Page 135

    Enablers 135 bool scs_canundocheckout() description this function returns whether the undo checkout menu item should be enabled. Arguments void *connectiondata , const char *remotepathlist[] , const char * localpathlist[] , const int numitems • the connectiondata argument is a pointer to the agent’s...

  • Page 136

    136 chapter 10: the source control integration api returns a boolean value: true if successful; false otherwise. Bool scs_canrename() description this function returns whether the rename menu item should be enabled. Arguments void *connectiondata , const char * remotepath • the connectiondata argume...

  • Page 137

    Enablers 137 bool scs_beforeput() description dreamweaver calls this function before putting or checking in one or more files. This function lets your dll perform one operation, such as adding a check-in comment, to a group of files. Arguments *connectiondata • the * connectiondata argument is a poi...

  • Page 138

    138 chapter 10: the source control integration api bool scs_afterput() description dreamweaver calls this function after putting or checking in one or more files. This function lets the dll perform any operation after a batch put or check in, such as creating a summary dialog box. Arguments *connect...

  • Page 139: Part II

    Part ii javascript api use any of the more than 600 core javascript functions available in macromedia dreamweaver mx 2004, which encapsulate the kinds of tasks users perform when creating or editing a document. You can use these functions to perform any task that the user can accomplish using menus,...

  • Page 140

    000_dw_api_print.Book page 140 wednesday, august 20, 2003 9:14 am.

  • Page 141: Chapter 11

    141 chapter 11 application the application functions perform operations related to macromedia dreamweaver mx 2004’s interaction with other applications or dreamweaver operations independent of individual documents (setting preferences, exiting dreamweaver, and other functions). External application ...

  • Page 142

    142 chapter 11: application example the following function uses the dreamweaver.Browsedocument() function to open the hotwired home page in a browser: function gotohotwired(){ dreamweaver.Browsedocument('http://www.Hotwired.Com/'); } in dreamweaver 4, you can expand this operation to open the docume...

  • Page 143

    External application functions 143 arguments fileurl • the fileurl argument can be a complete file:// url, a filename, or a file extension (including the period). Returns an array that contains a pair of strings for each editor in the list. The first string in each pair is the name of the editor, an...

  • Page 144

    144 chapter 11: application example the following example calls the dw.Getflashpath() function to obtain the path to the flash application and then passes the path in the form of a file://url to the dw.Openwithapp() function to open the document with flash: var mydoc = dreamweaver.Getdocumentdom(); ...

  • Page 145

    External application functions 145 dreamweaver.Getsecondarybrowser() availability dreamweaver 3. Description gets the path to the secondary browser. Arguments none. Returns a string that contains the path on the user’s computer to the secondary browser, which is expressed as a file:// url. If no sec...

  • Page 146

    146 chapter 11: application each book-id entry has the following attributes: ■ the id attribute is the book id that is used in the help.Map and helpdoc.Js files. ■ the win-mapping attribute is the windows book name, which is "usingdreamweaver.Chm" in this example. ■ the mac-mapping attribute is the ...

  • Page 147

    External application functions 147 dreamweaver.Openwithbrowsedialog() availability dreamweaver 3. Description opens the select external editor dialog box to let the user select the application with which to open the specified file. Arguments fileurl • the fileurl argument is the path to the file to ...

  • Page 148

    148 chapter 11: application returns nothing. Dreamweaver.Validateflash() availability dreamweaver mx. Description determines whether flash mx (or a later version) is installed on the local computer. Arguments none. Returns a boolean value: true if flash mx (or a later version) is installed on the lo...

  • Page 149

    Global application functions 149 dreamweaver.Getshowdialogsoninsert() availability dreamweaver 3. Description checks whether the show dialog when inserting objects option is turned on in the general category of preferences. Arguments none. Returns a boolean value that indicates whether the option is...

  • Page 150

    150 chapter 11: application dreamweaver.Showdynamicdatadialog() availability dreamweaver ultradev 1. Description displays the dynamic data or the dynamic text dialog box, and waits for the user to dismiss the dialog box. If the user clicks ok, the showdynamicdatadialog() function returns a string to...

  • Page 151

    Global application functions 151 dreamweaver.Showpreferencesdialog() availability dreamweaver 3. Description opens the preferences dialog box. Arguments {strcategory} • the strcategory argument, which is optional, must be one of the following strings to open the correlating category of the preferenc...

  • Page 152

    152 chapter 11: application 000_dw_api_print.Book page 152 wednesday, august 20, 2003 9:14 am.

  • Page 153: Chapter 12

    153 chapter 12 workspace workspace api functions create or operate on an element of the macromedia dreamweaver mx 2004 workspace. They perform tasks such as redoing steps that appear in the history panel, placing an object on the insert bar, navigating with keyboard functions, reloading menus, manip...

  • Page 154

    154 chapter 12: workspace dom.Undo() availability dreamweaver 3. Description undoes the previous step in the document. Arguments none. Returns nothing. Enabler “dom.Canundo()” on page 441 . Dreamweaver.Getredotext() availability dreamweaver 3. Description gets the text that is associated with the ed...

  • Page 155

    History functions 155 returns a string that contains the text that is associated with the editing operation that will be undone. Example if the user’s last action applied a cascading style sheet (css) style to a selected range of text, a call to the dreamweaver.Getundotext() function returns "undo a...

  • Page 156

    156 chapter 12: workspace dreamweaver.Startrecording() availability dreamweaver 3. Description starts recording steps in the active document; the previously recorded command is immediately discarded. Arguments none. Returns nothing. Enabler “dreamweaver.Isrecording()” on page 451 (must return a valu...

  • Page 157

    History functions 157 returns nothing. Enabler “dom.Canundo()” on page 441 . Dreamweaver.Historypalette.Clearsteps() availability dreamweaver 3. Description clears all steps from the history panel and disables the undo and redo menu items. Arguments none. Returns nothing. Dreamweaver.Historypalette....

  • Page 158

    158 chapter 12: workspace dreamweaver.Historypalette.Getselectedsteps() availability dreamweaver 3. Description determines which portion of the history panel is selected. Arguments none. Returns an array that contains the position indices of all the selected steps. The first position is position 0 (...

  • Page 159

    History functions 159 dreamweaver.Historypalette.Getstepsasjavascript() availability dreamweaver 3. Description gets the javascript equivalent of the specified history steps. Arguments arrayofindices • the arrayofindices argument is an array of position indices in the history panel. Returns a string...

  • Page 160

    160 chapter 12: workspace dreamweaver.Historypalette.Replaysteps() availability dreamweaver 3. Description replays the specified history steps in the active document. Dreamweaver warns the user of possible unintended consequences if the specified steps include an unrepeatable action. Arguments array...

  • Page 161

    Insert object functions 161 arguments arrayofindices • the arrayofindices function is an array of position indices in the history panel. If no argument is supplied, all the steps are unselected. Returns nothing. Example the following code selects the first, second, and third steps in the history pan...

  • Page 162

    162 chapter 12: workspace returns nothing. Example the following example inserts the navigation bar flash component, which resides in the components/objects/flashelements/navigation folder, into the current document: dom.Insertflashelement("avigationavbar.Swc"); dreamweaver.Objectpalette.Getmenu...

  • Page 163

    Keyboard functions 163 returns a boolean value: true if the new default is successfully set; false otherwise. Example the following example sets the flash object as the default object for the media menu: dw.Objectpalette.Setmenudefault("dw_media", "dw_flash"); dreamweaver.Reloadobjects() availabilit...

  • Page 164

    164 chapter 12: workspace returns nothing. Dom.Arrowleft() availability dreamweaver 3. Description moves the insertion point to the left the specified number of times. Arguments {ntimes} , {bshiftisdown} • the ntimes argument, which is optional, is the number of times that the insertion point must m...

  • Page 165

    Keyboard functions 165 arguments {ntimes} , {bshiftisdown} • the ntimes argument, which is optional, is the number of times that the insertion point must move up. If this argument is omitted, the default is 1. • the bshiftisdown argument, which is optional, is a boolean value that indicates whether ...

  • Page 166

    166 chapter 12: workspace dom.Endofdocument() availability dreamweaver 3. Description moves the insertion point to the end of the document (that is, after the last visible content in the document window or after the closing html tag in the code inspector, depending on which window has focus). Argume...

  • Page 167

    Keyboard functions 167 arguments {ntimes} , {bshiftisdown} • the ntimes argument, which is optional, is the number of paragraphs that the insertion point must move ahead. If this argument is omitted, the default is 1. • the bshiftisdown argument is a boolean value that indicates whether to extend th...

  • Page 168

    168 chapter 12: workspace dom.Pageup() availability dreamweaver 3. Description moves the insertion point up one page (equivalent to pressing the page up key). Arguments {ntimes} , {bshiftisdown} • the ntimes argument, which is optional, is the number of pages that the insertion point must move up. I...

  • Page 169

    Keyboard functions 169 arguments {ntimes} , {bshiftisdown} • the ntimes argument, which is optional, is the number of words that the insertion point must move back. If this argument is omitted, the default is 1. • the bshiftisdown argument, which is optional, is a boolean value that indicates whethe...

  • Page 170

    170 chapter 12: workspace dreamweaver.Mapkeycodetochar() availability dreamweaver 4. Description takes a key code as retrieved from the event object’s keycode field and translates it to a character. You should check whether the key code is a special key, such as home, pgup, and so on. If the key cod...

  • Page 171

    Menu functions 171 dreamweaver.Notifymenuupdated() availability dreamweaver 3. Description notifies dreamweaver when the specified menu needs to be updated. Arguments menuid , menulistfunction • the menuid argument is a string that contains the value of the id attribute for the menu item, as specifi...

  • Page 172

    172 chapter 12: workspace results window functions results window functions let you create a stand-alone window that displays columns of formatted data, or you can interact with the built-in windows of the results panel group. Creating a stand-alone results window these functions create custom windo...

  • Page 173

    Results window functions 173 example the following example checks for errors at the offset of the current selection in the document and, if there are errors, displays them in the specified window ( floatername ) of the results panel. Otherwise, it opens the target browser check window of the results...

  • Page 174

    174 chapter 12: workspace returns a boolean value: true if the item was added successfully; false otherwise. Example the following example creates a results window called reswin that has the column headings: frodo, sam, and gollum. The call to the reswin.Additem() function adds a folder icon and the...

  • Page 175

    Results window functions 175 returns nothing. Reswin.Setcallbackcommands() availability dreamweaver 4. Description tells the results window on which commands to call the processfile() method. If this function is not called, the command that created the results window is called. Arguments arrcmdnames...

  • Page 176

    176 chapter 12: workspace arguments arrfilepaths , brecursive • the arrfilepaths argument is an array of file or folder paths to iterate through. • the brecursive argument is a boolean value that indicates whether the iteration should be recursive ( true ) or not ( false ). Returns nothing. Reswin.S...

  • Page 177

    Results window functions 177 arguments none. Returns nothing. Working with the built-in results panel group these functions produce output in the results panel group. The results panel group displays tabbed reports on searches, source validation, sitewide reports, browser targets, console reports, f...

  • Page 178

    178 chapter 12: workspace dreamweaver.Resultspalette.Copy() availability dreamweaver mx. Description sends a copied message to the window that is in focus (often used for the ftp logging window). Arguments none. Returns nothing. Enabler “dreamweaver.Resultspalette.Cancopy()” on page 452 . Dreamweave...

  • Page 179

    Results window functions 179 enabler “dreamweaver.Resultspalette.Canpaste()” on page 453 . Dreamweaver.Resultspalette.Openinbrowser availability dreamweaver mx. Description sends a report (site reports, browser target check, validation, and link checker) to the default browser. Arguments none. Retur...

  • Page 180

    180 chapter 12: workspace arguments none. Returns nothing. Enabler “dreamweaver.Resultspalette.Cansave()” on page 454 . Dreamweaver.Resultspalette.Selectall() availability dreamweaver mx. Description sends a select all command to the window in focus. Arguments none. Returns nothing. Enabler “dreamwe...

  • Page 181

    Results window functions 181 dreamweaver.Resultspalette.Debugwindow.Adddebugcontextdata() availability dreamweaver mx. Description interprets a customized xml file that returns from the server that is specified in the site definition dialog box. The contents of the xml file display as tree data in t...

  • Page 182

    182 chapter 12: workspace name.Macromedia.Com:1111;databasename=pubs]]> name.Macromedia.Com:1111;databasename=pubs]]> coldfusion.Compiler.Taginfonotfoundexception]]> coldfusion.Compiler.Taginfonotfoundexception]]> returns nothing. Toggle functions toggle functions get and set various options either ...

  • Page 183

    Toggle functions 183 dom.Getpreventlayeroverlaps() availability dreamweaver 3. Description this function gets the current state of the prevent layer overlaps option. Arguments none. Returns a boolean value: true turns on the prevent layer overlaps option; false otherwise. Dom.Getshowautoindent() ava...

  • Page 184

    184 chapter 12: workspace dom.Getshowgrid() availability dreamweaver 3. Description this function gets the current state of the view > grid > show option. Arguments none. Returns a boolean value: true indicates the grid is visible; false otherwise. Dom.Getshowheadview() availability dreamweaver 3. D...

  • Page 185

    Toggle functions 185 dom.Getshowimagemaps() availability dreamweaver 3. Description this function gets the current state of the view > image maps option. Arguments none. Returns a boolean value: true indicates the image maps are visible; false otherwise. Dom.Getshowinvisibleelements() availability d...

  • Page 186

    186 chapter 12: workspace dom.Getshowlinenumbers() availability dreamweaver 4. Description this function determines whether line numbers are shown in the code view. Arguments none. Returns a boolean value: true indicates the line numbers are shown; false otherwise. Dom.Getshowrulers() availability d...

  • Page 187

    Toggle functions 187 dom.Getshowtableborders() availability dreamweaver 3. Description this function gets the current state of the view > table borders option. Arguments none. Returns a boolean value: true indicates the table borders are visible; false otherwise. Dom.Getshowtoolbar() availability dr...

  • Page 188

    188 chapter 12: workspace dom.Getshowwordwrap() availability dreamweaver 4. Description this function determines whether word wrap is on in the code view of the document window. Arguments none. Returns a boolean value: true if word wrap is on; false otherwise. Dom.Getsnaptogrid() availability dreamw...

  • Page 189

    Toggle functions 189 dom.Sethideallvisualaids() availability dreamweaver 4. Description this function turns off the display of all borders, image maps, and invisible elements, regardless of their individual settings in the view menu. Arguments bset • the bset argument is a boolean value: true hides ...

  • Page 190

    190 chapter 12: workspace dom.Setshowgrid() availability dreamweaver 3. Description this function toggles the view > grid > show option on and off. Arguments bshowgrid • the bshowgrid argument is a boolean value: true turns on the view > grid > show option; false turns it off. Returns nothing. Dom.S...

  • Page 191

    Toggle functions 191 returns nothing. Dom.Setshowimagemaps() availability dreamweaver 3. Description this function toggles the view > image maps option on and off. Arguments bshowimagemaps • the bshowimagemaps argument is a boolean value, true turns on the image maps option; false turns it off. Retu...

  • Page 192

    192 chapter 12: workspace returns nothing. Dom.Setshowlinenumbers() availability dreamweaver 4. Description this function shows or hides the line numbers in the code view of the document window. Arguments bshow • the bshow argument is a boolean value: true indicates the line numbers should be visibl...

  • Page 193

    Toggle functions 193 returns nothing. Dom.Setshowtableborders() availability dreamweaver 3. Description this function toggles the view > table borders option on and off. Arguments bshowtableborders • the bshowtableborders argument is a boolean value: true turns on the table borders option; false tur...

  • Page 194

    194 chapter 12: workspace returns nothing. Dom.Setshowwordwrap() availability dreamweaver 4. Description this function toggles the word wrap option off or on in the code view of the document window. Arguments bshow • the bshow argument is a boolean value: true indicates that the lines should wrap; f...

  • Page 195

    Toggle functions 195 returns a boolean value: true indicates whether the hide panels option is on; false indicates the show panels option is on. Dreamweaver.Getshowstatusbar() availability dreamweaver 3. Description this function gets the current state of the view > status bar option. Arguments none...

  • Page 196

    196 chapter 12: workspace dreamweaver.Htmlinspector.Getshowlinenumbers() availability dreamweaver 4. Description this function determines whether line numbers appear in the code inspector. Arguments none. Returns a boolean value: true if line numbers appear; false otherwise. Dreamweaver.Htmlinspecto...

  • Page 197

    Toggle functions 197 dreamweaver.Htmlinspector.Setshowautoindent() availability dreamweaver 4. Description this function turns the auto indent option on or off in the code inspector. Arguments bshow • the bshow argument is a boolean value: true turns the auto-indenting on; false turns it off. Return...

  • Page 198

    198 chapter 12: workspace dreamweaver.Htmlinspector.Setshowsyntaxcoloring() availability dreamweaver 4. Description this function turns syntax coloring on or off in the code view of the code inspector. Arguments bshow • the bshow argument is a boolean value: true indicates that the syntax coloring s...

  • Page 199

    Toggle functions 199 dreamweaver.Setshowstatusbar() availability dreamweaver 3. Description this function toggles the view > status bar option on or off. Arguments bshowstatusbar • the bshowstatusbar argument is a boolean value: true turns on the status bar option; false turns it off. Returns nothin...

  • Page 200

    200 chapter 12: workspace site.Getshowpagetitles() availability dreamweaver 3. Description this function gets the current state of the show page titles option. Arguments none. Returns a boolean value: true indicates that the page titles are visible in the site map; false otherwise. Site.Getshowtoolt...

  • Page 201

    Toggle functions 201 site.Setshowhiddenfiles() availability dreamweaver 3. Description this function toggles the show files marked as hidden option in the site map on or off. Arguments bshowhiddenfiles • the bshowhiddenfiles argument is a boolean value: true turns on the show files marked as hidden ...

  • Page 202

    202 chapter 12: workspace returns nothing. Toolbar functions the following javascript functions let you get and set the visibility of toolbars and toolbar labels, obtain the labels of toolbar items in the current window, position toolbars, and obtain toolbar ids. For more information on creating or ...

  • Page 203

    Toolbar functions 203 dom.Gettoolbaridarray() availability dreamweaver mx. Description this function returns an array of the ids of all the toolbars in the application. You can use dom.Gettoolbaridarray() to turn off all toolbars so you can reposition them and make only a specific set visible. Argum...

  • Page 204

    204 chapter 12: workspace else{ dom.Removefontmarkupasstyle('font-size'); } } dom.Gettoolbarlabel() availability dreamweaver mx. Description this function obtains the label of the specified toolbar. You can use dom.Gettoolbarlabel() for menus that show or hide toolbars. Arguments toolbar_id • the to...

  • Page 205

    Toolbar functions 205 dom.Settoolbaritemattribute() availability dreamweaver mx 2004. Description changes an attribute value for the three image attributes or the tooltip attribute on a toolbar item. Arguments toolbarid, toolbaritemid, attrname, attrvalue • the toolbarid argument is a string that sp...

  • Page 206

    206 chapter 12: workspace example the following example tells dreamweaver to show the labels for the buttons on the toolbars: dom.Setshowtoolbariconlabels(true); dom.Settoolbarposition() availability dreamweaver mx. Description this function moves the specified toolbar to the specified position. Not...

  • Page 207

    Window functions 207 arguments toolbar_id, bshow • the toolbar_id argument is the id of the toolbar, the value of the id attribute on the toolbar tag in the toolbars.Xml file. • the bshow argument is a boolean value that indicates whether to show or hide the toolbar. If bshow is true , dom.Settoolba...

  • Page 208

    208 chapter 12: workspace dom.Getview() availability dreamweaver 4. Description this function determines which view is visible. Arguments none. Returns "design" , "code" , or "split" , depending on the visible view. Dom.Getwindowtitle() availability dreamweaver 3. Description this function gets the ...

  • Page 209

    Window functions 209 dreamweaver.Bringattentiontofloater() availability dreamweaver mx. Description brings the specified panel or inspector to the front, and draws attention to the panel or inspector by making it flash, which is slightly different functionality than dw.Togglefloater() . Arguments fl...

  • Page 210

    210 chapter 12: workspace dreamweaver.Getactivewindow() availability dreamweaver 3. Description this function gets the document in the active window. Arguments none. Returns the document object that corresponds to the document in the active window; or, if the document is in a frame, the document obj...

  • Page 211

    Window functions 211 the floatername values for built-in dreamweaver panels are the strings to the right of the panel names in the following list: returns a boolean value: true if the floating panel is visible and in the front; false otherwise or if dreamweaver cannot find a floating panel named flo...

  • Page 212

    212 chapter 12: workspace dreamweaver.Getfocus() availability dreamweaver 4. Description this function determines what part of the application is currently in focus. Arguments ballowfloaters • the ballowfloaters argument is a boolean value: true if you want the function to return the name of the flo...

  • Page 213

    Window functions 213 arguments none. Returns an integer that represents the snapping distance in pixels. The default is 10 pixels; 0 indicates that the snap feature is off. Dreamweaver.Minimizerestoreall() availability dreamweaver 4. Description this function minimizes (reduces to an icon) or restor...

  • Page 214

    214 chapter 12: workspace dreamweaver.Setfloatervisibility() availability dreamweaver 3. Description this function specifies whether to make a particular floating panel or inspector visible. Arguments floatername , bisvisible • the floatername argument is the name of a floating panel. If floatername...

  • Page 215

    Window functions 215 the bisvisible argument is a boolean value that indicates whether to make the floating panel visible. Returns nothing. Dreamweaver.Setprimaryview() availability dreamweaver 4. Description this function displays the specified view at the top of the document window. Arguments view...

  • Page 216

    216 chapter 12: workspace dreamweaver.Showproperties() availability dreamweaver 3. Description this function makes the property inspector visible and gives it focus. Arguments none. Returns nothing. Dreamweaver.Tilehorizontally() availability dreamweaver mx (windows only). Description tiles the docu...

  • Page 217

    Window functions 217 example the following example tiles the open documents vertically: dw.Tilevertically() dreamweaver.Togglefloater() availability dreamweaver 3. Description this function shows, hides, or brings to the front the specified panel or inspector. Note: this function is meaningful only ...

  • Page 218

    218 chapter 12: workspace 000_dw_api_print.Book page 218 wednesday, august 20, 2003 9:14 am.

  • Page 219: Chapter 13

    219 chapter 13 site site functions perform operations related to managing a website. These operations include customizing a report, defining a new site, checking in and checking out files, running validation on a site and so on. Report functions report functions provide access to the macromedia drea...

  • Page 220

    220 chapter 13: site returns nothing. Site functions site functions handle operations that are related to files in the site files or site map. These functions let you perform the following tasks: • create links between files • get, put, check in, and check out files • select and deselect files • cre...

  • Page 221

    Site functions 221 site.Addlinktoexistingfile() availability dreamweaver 3. Description opens the select html file dialog box to let the user select a file and creates a link from the selected document to that file. Arguments none. Returns nothing. Enabler “site.Canaddlink()” on page 455 . Site.Addl...

  • Page 222

    222 chapter 13: site site.Changelinksitewide() availability dreamweaver 3. Description opens the change link sitewide dialog box. Arguments none. Returns nothing. Site.Changelink() availability dreamweaver 3. Description opens the select html file dialog box to let the user select a new file for the...

  • Page 223

    Site functions 223 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.Cancheckin()” on page 456 . Site.Checklinks() availability dreamwe...

  • Page 224

    224 chapter 13: site returns nothing. Enabler “site.Cancheckout()” on page 456 . Site.Checktargetbrowsers() availability dreamweaver 3. Description runs a target browser check on the selected files. Arguments none. Returns nothing. Site.Cloak() availability dreamweaver mx. Description cloaks the cur...

  • Page 225

    Site functions 225 site.Definesites() availability dreamweaver 3. Description this function opens the edit sites dialog box. Arguments none. Returns nothing. Site.Deleteselection() availability dreamweaver 3. Description deletes the selected files. Arguments none. Returns nothing. Site.Deployfilesto...

  • Page 226

    226 chapter 13: site site.Editcolumns() description this function displays the edit sites dialog box, which shows the file view columns section. Arguments none. Returns nothing. Site.Exportsite() availability dreamweaver mx. Description exports a dreamweaver site to an xml file, which can be importe...

  • Page 227

    Site functions 227 localwidth="180" remotewidth="180" /> align="center" show="true" share="false" builtin="true" localwidth="36" remotewidth="36" /> align="right" show="true" share="false" builtin="true" localwidth="-2" remotewidth="-2" /> align="left" show="true" share="false" builtin="true" localw...

  • Page 228

    228 chapter 13: site site.Findlinksource() availability dreamweaver 3. Description opens the file that contains the selected link or dependent file, and highlights the text of the link or the reference to the dependent file. This function operates only on files in the site map view. Arguments none. ...

  • Page 229

    Site functions 229 site.Getappserveraccesstype() availability dreamweaver mx. Description returns the access method that is used for all files on the current site’s application server. The current site is the site that is associated with the document that currently has focus. If no document has focu...

  • Page 230

    230 chapter 13: site site.Getappurlprefixforsite() availability dreamweaver mx. Description gets the value of the url prefix of the currently selected site. Arguments none. Returns a string that contains the url prefix of the currently selected site. Example siteprefix = getappurlprefixforsite(); si...

  • Page 231

    Site functions 231 returns a string that contains the login and check-out name of the user who has the file checked out or an empty string if the file is not checked out. Example a call to site.Getcheckoutuserforfile("file://c:/sites/avocado8/index.Html") might return "denise (deniselaptop)" . If no...

  • Page 232

    232 chapter 13: site site.Getcurrentsite() availability dreamweaver 3. Description gets the current site. Arguments none. Returns a string that contains the name of the current site. Example if you defined several sites, a call to site.Getcurrentsite() returns the one that is currently showing in th...

  • Page 233

    Site functions 233 returns a boolean value: true if all the selected links are visible; false otherwise. Site.Getlocalpathtofiles() availability dreamweaver mx. Description determines the path to the local files that are defined for the current site. The current site is the site that is associated w...

  • Page 234

    234 chapter 13: site arguments fileurl • the fileurl argument is the fully qualified url (including the string " file://" ) for a named file. Returns a string that contains the name of the site, if any, in which the specified file exists. The string is empty when the specified file does not exist in...

  • Page 235

    Site functions 235 site.Invertselection() availability dreamweaver 3. Description inverts the selection in the site map. Arguments none. Returns nothing. Site.Iscloaked() availability dreamweaver mx. Description determines whether the current selection in the site panel or the specified folder is cl...

  • Page 236

    236 chapter 13: site returns nothing. Enabler “site.Canlocateinsite()” on page 458 . Site.Makeeditable() availability dreamweaver 3. Description turns off the read-only flag on the selected files. Arguments none. Returns nothing. Enabler “site.Canmakeeditable()” on page 459 . Site.Makenewdreamweaver...

  • Page 237

    Site functions 237 site.Makenewfolder() availability dreamweaver 3. Description creates a new folder in the site panel in the same folder as the first selected file or folder. Arguments none. Returns nothing. Enabler “site.Canmakenewfileorfolder()” on page 459 . Site.Newhomepage() availability dream...

  • Page 238

    238 chapter 13: site site.Open() availability dreamweaver 3. Description opens the files that are currently selected in the site panel. If any folders are selected, they are expanded in the site files view. Arguments none. Returns nothing. Enabler “site.Canopen()” on page 460 . Site.Put() availabili...

  • Page 239

    Site functions 239 site.Recreatecache() availability dreamweaver 3. Description re-creates the cache for the current site. Arguments none. Returns nothing. Enabler “site.Canrecreatecache()” on page 460 . Site.Refresh() availability dreamweaver 3. Description refreshes the file listing on the specifi...

  • Page 240

    240 chapter 13: site returns a boolean value that indicates whether a remote site has been defined and, if the server type is local/network, whether the drive is mounted. Site.Removelink() availability dreamweaver 3. Description removes the selected link from the document above it in the site map. A...

  • Page 241

    Site functions 241 returns nothing. Site.Saveasimage() availability dreamweaver 3. Description opens the save as dialog box to let the user save the site map as an image. Arguments filetype • the filetype argument is the type of image that should be saved. Valid values for windows are "bmp" and "png...

  • Page 242

    242 chapter 13: site returns nothing. Site.Selectnewer() availability dreamweaver 3. Description selects all files that are newer on the specified side of the site panel. Arguments whichside • the whichside argument must be either "local" or "remote" . Returns nothing. Enabler “site.Canselectnewer()...

  • Page 243

    Site functions 243 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. R...

  • Page 244

    244 chapter 13: site 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:...

  • Page 245

    Site functions 245 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, ...

  • Page 246

    246 chapter 13: site 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() func...

  • Page 247

    Site functions 247 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 mu...

  • Page 248

    248 chapter 13: site 000_dw_api_print.Book page 248 wednesday, august 20, 2003 9:14 am.

  • Page 249: Chapter 14

    249 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 spe...

  • Page 250

    250 chapter 14: document 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 ...

  • Page 251

    Command functions 251 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 work...

  • Page 252

    252 chapter 14: document file manipulation functions file manipulation functions handle creating, opening, and saving documents (including xml and xhtml), converting existing html documents into xhtml, and exporting css to external files. These functions accomplish such tasks as browsing for files o...

  • Page 253

    File manipulation functions 253 • a title element • a body section during the conversion, the dom.Converttoxhtml() function converts pure html tags and attributes to lowercase, writes html tags and attributes with correct xhtml syntax, and adds missing html attributes where it can. This function tre...

  • Page 254

    254 chapter 14: document dreamweaver.Browseforfileurl() availability dreamweaver 1, enhanced in 2, 3, and 4. Description opens the specified type of dialog box with the specified label in the title bar. Arguments openselectorsave , {titlebarlabel} , {bshowpreviewpane}, ¬ {bsupresssiterootwarnings} ,...

  • Page 255

    File manipulation functions 255 returns a string that contains the name of the folder, which is expressed as a file:// url. Example the following code returns the url of a folder: return dreamweaver.Browseforfolderurl('select a folder', ¬ dreamweaver.Getsiteroot()); dreamweaver.Closedocument() avail...

  • Page 256

    256 chapter 14: document • the type argument specifies the type of document to create, as declared in the dreamweaver configuration/documenttypes/mmdocumenttypes.Xml file as the id attribute of the documenttype tag. For example, the type argument could be "html", "asp-js", "asp- vb", "coldfusion", "...

  • Page 257

    File manipulation functions 257 arguments {bopeninsamewindow} • the bopeninsamewindow argument is a boolean value that indicates whether to open the new document in the current window. If this value is false or omitted, or if the function is called on the macintosh, the new document opens in a separ...

  • Page 258

    258 chapter 14: document dreamweaver.Exporteditableregionsasxml() (deprecated) availability dreamweaver 3; deprecated in mx. Description this function opens the export editable regions as xml dialog box. Arguments none. Returns nothing. Dreamweaver.Exporttemplatedataasxml() availability dreamweaver ...

  • Page 259

    File manipulation functions 259 dreamweaver.Getdocumentdom() availability dreamweaver 2. Description provides access to the objects tree for the specified document. After the tree of objects returns to the caller, the caller can edit the tree to change the contents of the document. Arguments {source...

  • Page 260

    260 chapter 14: document dreamweaver.Getnewdocumentdom() availability dreamweaver mx. Description provides access to the editable tree for a new, empty document. This function works in the same way as the getdocumetdom() function, except that it points to a new document, not an existing one, and doe...

  • Page 262

    262 chapter 14: document dreamweaver.Opendocument() availability dreamweaver 2. Description opens a document for editing in a new dreamweaver window and gives it the focus. For a user, the effect is the same as selecting file > open and selecting a file. If the specified file is already open, the wi...

  • Page 263

    File manipulation functions 263 dreamweaver.Openinframe() availability dreamweaver 3. Description opens the open in frame dialog box. When the user selects a document, it opens into the active frame. Arguments none. Returns nothing. Enabler “dreamweaver.Canopeninframe()” on page 445 . Dreamweaver.Re...

  • Page 264

    264 chapter 14: document dreamweaver.Revertdocument() availability dreamweaver 3. Description reverts the specified document to the previously saved version. Arguments documentobject • the documentobject argument is the object at the root of a document’s dom tree, which is the value that the dreamwe...

  • Page 265

    File manipulation functions 265 arguments documentobject , {fileurl} • the documentobject argument is the object at the root of a document’s dom tree, which is the value that the dreamweaver.Getdocumentdom() function returns. • the fileurl argument, which is optional, is a url that represents a loca...

  • Page 266

    266 chapter 14: document returns nothing. Enabler “dreamweaver.Cansavedocumentastemplate()” on page 447 . Dreamweaver.Saveframeset() availability dreamweaver 3. Description saves the specified frameset or opens the save as dialog box if the frameset has not previously been saved. Arguments documento...

  • Page 267

    Global document functions 267 global document functions global document functions act on an entire document. They check spelling, check target browsers, set page properties, and determine correct object references for elements in the document. Dom.Checkspelling() availability dreamweaver 3. Descript...

  • Page 268

    268 chapter 14: document returns a string that specifies the current parsing mode: "html" , "xml" , "css" , or "text" . Dom.Hideinfomessagepopup() availability dreamweaver mx 2004. Description hides the tooltip-like message, if it is visible, for the document window. Arguments none. Returns nothing....

  • Page 269

    Global document functions 269 note: an automatic validation (defined by the controlstring value "auto-explicit" or "auto- implicit" ) is currently available only for a target browser check. • the bopenresultswindow argument is an optional boolean value: true opens the validation results window; fals...

  • Page 270

    270 chapter 14: document returns nothing. Example the following example displays two tooltip messages. The first line of code displays the message "this message is in the center" in the center of the document. The second call to showinfomessagepopup() displays the tooltip message "don’t forget the t...

  • Page 271

    Global document functions 271 example the following example calls dw.Dourldecoding() to decode the special characters in its argument and store the resulting string in outstr : outstr = dreamweaver.Dourldecoding(“http://maps.Yahoo.Com/py/ ddresults.Py?Pyt=tmap&tarname=&tardesc=&newname=&newdesc=&new...

  • Page 272

    272 chapter 14: document dreamweaver.Getobjectrefs() (deprecated) availability dreamweaver 1; deprecated in 3. Description this function scans the specified document for instances of the specified tags or, if no tags are specified, for all tags in the document and formulates browser-specific referen...

  • Page 273

    Global document functions 273 dreamweaver.Getobjecttags() (deprecated) availability dreamweaver1; deprecated in 3. Description this function scans the specified document for instances of the specified tags or, if no tags are specified, for all tags in the document. This function is equivalent to cal...

  • Page 274

    274 chapter 14: document dreamweaver.Getpreferenceint() availability dreamweaver mx. Description lets you retrieve an integer preference setting for an extension. Arguments section, key, default_value • the section argument is a string that specifies the preferences section that contains the entry. ...

  • Page 275

    Global document functions 275 example the following example returns the string value of the text editor setting in the my extension section of preferences. If there is no myextension section or no text editor entry, the function returns the default value specified by the variable txteditor . Var txt...

  • Page 276

    276 chapter 14: document dreamweaver.Setpreferencestring() availability dreamweaver mx. Description lets you write a string preference setting for an extension. This setting is stored with dreamweaver preferences when dreamweaver is not running. Arguments section , key , new_value • the section argu...

  • Page 277

    Path functions 277 path functions path functions get and manipulate the paths to various files and folders on a user’s hard disk. These functions determine the path to the root of the site in which the current document resides, convert relative paths to absolute urls, and more. Dreamweaver.Getconfig...

  • Page 278

    278 chapter 14: document returns either a string that contains the url of the specified document if the file was saved or an empty string if the file was not saved. Dreamweaver.Getsiteroot() availability dreamweaver 1.2. Description gets the local root folder (as specified in the site definition dia...

  • Page 279

    Selection functions 279 dreamweaver.Relativetoabsoluteurl() availability dreamweaver 2. Description given a relative url and a point of reference (either the path to the current document or the site root), this function converts the relative url to an absolute file:// url. Arguments docpath , sitero...

  • Page 280

    280 chapter 14: document dom.Getselection() availability dreamweaver 3. Description gets the selection, which is expressed as character offsets into the document’s source code. Arguments {ballowmultiple} • the ballowmultiple argument, which is optional, is a boolean value that indicates whether the ...

  • Page 281

    Selection functions 281 example the following code selects the first image object in the current document: var thedom = dw.Getdocumentdom(); var theimg = thedom.Images[0]; var offsets = thedom.Nodetooffsets(theimg); thedom.Setselection(offsets[0], offsets[1]); dom.Offsetstonode() availability dreamw...

  • Page 282

    282 chapter 14: document arguments none. Returns nothing. Dom.Setselectednode() availability dreamweaver 3. Description sets the selected node. This function is equivalent to calling the dom.Nodetooffsets() function and passing the return value to the dom.Setselection() function. Arguments node , {b...

  • Page 283

    Selection functions 283 dreamweaver.Getselection() (deprecated) availability dreamweaver 2; deprecated in 3. See “dom.Getselection()” on page 280 . Description gets the selection in the current document, which is expressed as byte offsets into the document’s source code. Arguments none. Returns an a...

  • Page 284

    284 chapter 14: document var selarr; if (dw.Nodeexists(selobj)) selarr = dom.Nodetooffsets(selobj); else selarr = dom.Nodetooffsets(findtable()); dom.Setselection(selarr[0],selarr[1]); } dreamweaver.Nodetooffsets() (deprecated) availability dreamweaver 2; deprecated in 3 in favor of “dom.Nodetooffse...

  • Page 285

    Selection functions 285 dreamweaver.Selectall() availability dreamweaver 3. Description performs a select all operation in the active document window, the site panel or, on the macintosh, the text field that has focus in a dialog box or floating panel. Note: if the operation takes place in the activ...

  • Page 286

    286 chapter 14: document string manipulation functions string manipulation functions help you get information about a string as well as convert a string from latin 1 encoding to platform-native encoding and back. Dreamweaver.Dourlencoding() availability dreamweaver 1. Description takes a string and ...

  • Page 287

    String manipulation functions 287 example the following call to the dw.Gettokens() function returns the tokens that come after it: dreamweaver.Gettokens('foo("my arg1", 34)', '(),') • foo • "my arg 1" • 34 dreamweaver.Latin1tonative() availability dreamweaver 2. Description converts a string in lati...

  • Page 288

    288 chapter 14: document dreamweaver.Scansourcestring() availability dreamweaver ultradev 1. Description scans a string of html and finds the tags, attributes, directives, and text. For each tag, attribute, directive, and text span that it finds, the scansourcestring() function invokes a callback fu...

  • Page 289

    String manipulation functions 289 6 dreamweaver calls the directive() function for each html comment, asp script, jsp script, or php script. The directive() function accepts two arguments, a string that contains the directive and the document offset, which is the number of bytes in the document befo...

  • Page 290

    290 chapter 14: document translation functions translation functions deal either directly with translators or with translation results. These functions get information about or run a translator, edit content in a locked region, and specify that the translated source should be used when getting and s...

  • Page 291

    Translation functions 291 dreamweaver.Gettranslatorlist() availability dreamweaver 3. Description this function gets a list of the installed translators. Arguments none. Returns an array of strings where each string represents the name of a translator as it appears in the translation preferences. Dr...

  • Page 292

    292 chapter 14: document 000_dw_api_print.Book page 292 wednesday, august 20, 2003 9:14 am.

  • Page 293: Chapter 15

    293 chapter 15 page content the page content functions perform operations that affect the content of a web page. These operations include manipulating assets in the assets panel, adding behaviors, cutting and pasting elements from the clipboard, applying a template, or inserting a code snippet. Asse...

  • Page 294

    294 chapter 15: page content dreamweaver.Assetpalette.Addtofavoritesfromsiteassets() availability dreamweaver 4. Description adds elements that are selected in the site list to the favorites list and gives each item a nickname in the favorites list. This function does not remove the element from the...

  • Page 295

    Assets panel functions 295 dreamweaver.Assetpalette.Edit() availability dreamweaver 4. Description edits selected elements with primary external editor or custom edit control. For colors, the color picker appears. For urls, a dialog box appears and prompts the user for a url and a nickname. This fun...

  • Page 296

    296 chapter 15: page content returns an array of the following three strings for each selected item: • the name string, which is the name/filename or nickname that appears in the assets panel. • the value string, which is the full path, full url, or color value, depending on the selected item. • the...

  • Page 297

    Assets panel functions 297 returns nothing. Enabler “dreamweaver.Assetpalette.Caninsertorapply()” on page 442 . Dreamweaver.Assetpalette.Locateinsite() availability dreamweaver 4. Description selects files that are associated with the selected elements in the local side of the site panel. This funct...

  • Page 298

    298 chapter 15: page content arguments none. Returns nothing. Dreamweaver.Assetpalette.Recreatelibraryfromdocument() availability dreamweaver 4. Description replaces the deprecated librarypalette function, recreatelibraryfromdocument() . It creates a library item (lbi) file for the selected instance...

  • Page 299

    Assets panel functions 299 returns nothing. Dreamweaver.Assetpalette.Renamenickname() availability dreamweaver 4. Description edits the folder name or the file’s nickname by displaying a text box around the existing nickname. It is available only in the favorites list or in the library or template c...

  • Page 300

    300 chapter 15: page content dreamweaver.Librarypalette.Deleteselecteditem() (deprecated) availability dreamweaver 3; deprecated in dreamweaver 4 in favor of using dreamweaver.Assetpalette.Setselectedcategory() , and then calling dreamweaver.Assetpalette.Removefromfavorites() . Description this func...

  • Page 301

    Assets panel functions 301 returns nothing. Dreamweaver.Librarypalette.Recreatefromdocument() (deprecated) availability dreamweaver 3; deprecated in dreamweaver 4 in favor of dreamweaver.Assetpalette.Recreatelibraryfromdocument() . Description this function creates an lbi file for the selected insta...

  • Page 302

    302 chapter 15: page content returns the relative font size as small , medium , or large . Dreamweaver.Referencepalette.Setfontsize() availability dreamweaver 4. Description changes the font size that appears in the reference panel. Arguments fontsize • the fontsize argument is one of the following ...

  • Page 303

    Behavior functions 303 dreamweaver.Templatepalette.Renameselectedtemplate() (deprecated) availability dreamweaver 3; deprecated in dreamweaver 4 in favor of using dreamweaver.Assetpalette.Setselectedcategory() with "templates" as the argument value, and then calling dreamweaver.Assetpalette.Renameni...

  • Page 304

    304 chapter 15: page content dom.Getbehavior() availability dreamweaver 3. Description gets the action at the specified position within the specified event. This function acts on the current selection and is valid only for the active document. Arguments event , {eventbasedindex} • the event argument...

  • Page 305

    Behavior functions 305 dom.Removebehavior() availability dreamweaver 3. Description removes the action at the specified position within the specified event. This function acts on the current selection and is valid only for the active document. Arguments event , {eventbasedindex} • the event argument...

  • Page 306

    306 chapter 15: page content example the dreamweaver.Getbehaviorelement() function can be used in the same way as dreamweaver.Getbehaviortag() to determine whether the selected action is appropriate for the selected html tag, except that it gives you access to more information about the tag and its ...

  • Page 307

    Behavior functions 307 returns a string that represents the source of the tag. This is the same string that passes as an argument ( htmlelement ) to the canacceptbehavior() function. If this function appears outside an action file, the return value is an empty string. Example if you write an action ...

  • Page 308

    308 chapter 15: page content dreamweaver.Behaviorinspector.Getbehaviorat() availability dreamweaver 3. Description gets the event/action pair at the specified position in the behaviors panel. Arguments positionindex • the positionindex argument is the position of the action in the behaviors panel. T...

  • Page 309

    Behavior functions 309 dreamweaver.Behaviorinspector.Getselectedbehavior() availability dreamweaver 3. Description gets the position of the selected action in the behaviors panel. Arguments none. Returns an integer that represents the position of the selected action in the behaviors panel, or –1 if ...

  • Page 310

    310 chapter 15: page content example if the behaviors panel is set up as shown in the following figure, calling the dreamweaver.Behaviorinspector.Movebehaviordown(2) function swaps the positions of the preload images and the change property actions on the onmousedown event. Calling the dreamweaver.B...

  • Page 311

    Behavior functions 311 example if the behaviors panel is set up as shown in the following figure, calling the dreamweaver.Behaviorinspector.Movebehaviorup(3) function swaps the positions of the preload images and the change property actions on the onmouseover event. Calling the dreamweaver.Behaviori...

  • Page 312

    312 chapter 15: page content example if the behaviors panel is set up as shown in the following figure, calling the dreamweaver.Behaviorinspector.Setselection(2) function selects the change property action that is associated with the onmousedown event: clipboard functions clipboard functions are rel...

  • Page 313

    Clipboard functions 313 dom.Clipcopytext() availability dreamweaver 3. Description copies the selected text to the clipboard, ignoring any html markup. Arguments none. Returns nothing. Enabler “dom.Canclipcopytext()” on page 432 . Dom.Clipcut() availability dreamweaver 3. Description removes the sel...

  • Page 314

    314 chapter 15: page content example if the clipboard contains abc widgets , a call to dw.Getdocumentdom().Clippaste() results in the following figure: dom.Clippastetext() availability dreamweaver 3. Description pastes the contents of the clipboard into the current document at the insertion point or...

  • Page 315

    Clipboard functions 315 example if the clipboard contains return true; , a call to dw.Getdocumentdom().Clippastetext() results in the following figure: dreamweaver.Clipcopy() availability dreamweaver 3. Description copies the current selection from the active document window, dialog box, floating pa...

  • Page 316

    316 chapter 15: page content dreamweaver.Clipcut() availability dreamweaver 3. Description removes the selection from the active document window, dialog box, floating panel, or site panel to the clipboard. Arguments none. Returns nothing. Enabler “dreamweaver.Canclipcut()” on page 443 . Dreamweaver....

  • Page 317

    Library and template functions 317 arguments {bastext} • the bastext boolean value, which is optional, specifies whether the clipboard content is retrieved as text. If bastext is a value of true , the clipboard content is retrieved as text. If bastext is a value of false , the content retains format...

  • Page 318

    318 chapter 15: page content dom.Detachfromlibrary() availability dreamweaver 3. Description detaches the selected library item instance from its associated lbi file by removing the locking tags from around the selection. This function is equivalent to clicking detach from original in the property i...

  • Page 319

    Library and template functions 319 dom.Geteditableregionlist() availability dreamweaver 3. Description gets a list of all the editable regions in the body of the document. Arguments none. Returns an array of element nodes. Example “dom.Getselectededitableregion()” on page 320 . Dom.Getislibrarydocum...

  • Page 320

    320 chapter 15: page content dom.Getselectededitableregion() availability dreamweaver 3. Description if the selection or insertion point is inside an editable region, this function gets the position of the editable region among all others in the body of the document. Arguments none. Returns an index...

  • Page 321

    Library and template functions 321 arguments none. Returns nothing. Enabler “dom.Canmarkselectionaseditable()” on page 437 . Dom.Neweditableregion() availability dreamweaver 3. Description displays the new editable region dialog box. When the user clicks new region, dreamweaver inserts the name of t...

  • Page 322

    322 chapter 15: page content dom.Updatecurrentpage() availability dreamweaver 3. Description updates the document’s library items, templates, or both. This function is valid only for the active document. Arguments {typeofupdate} • the optional typeofupdate argument must be "library" , "template" , o...

  • Page 323

    Snippets panel functions 323 snippets panel functions using dreamweaver, web developers can edit and save reusable blocks of code in the snippets panel and retrieve them as needed. The snippets panel stores each code snippet in a csn file within the configuration/snippets folder. Snippets that come ...

  • Page 324

    324 chapter 15: page content dreamweaver.Snippetpalette.Getcurrentsnippetpath() availability dreamweaver mx 2004. Description returns the path to the snippet that is currently selected in the snippets panel. Arguments none. Returns the path, relative to the snippets folder, to the snippet selected i...

  • Page 325

    Snippets panel functions 325 dreamweaver.Snippetpalette.Editsnippet() availability dreamweaver mx. Description opens the edit snippet dialog box and gives it focus, enabling editing for the selected element. Arguments none. Returns nothing. Enabler “dreamweaver.Snippetpalette.Caneditsnippet()” on pa...

  • Page 326

    326 chapter 15: page content dreamweaver.Snippetpalette.Insertsnippet() availability dreamweaver mx. Description inserts the indicated snippet into the current selection. Arguments • a string that specifies the path to the snippet relative to the snippets folder. Returns a boolean value. Enabler “dr...

  • Page 327: Chapter 16

    327 chapter 16 dynamic documents the dynamic documents functions in macromedia dreamweaver mx 2004 perform operations that are related to web server pages. These operations include returning a property for the selected node in the components panel, getting a list of all data sources in the user’s do...

  • Page 328

    328 chapter 16: dynamic documents dreamweaver.Servercomponents.Refresh() availability dreamweaver mx. Description refreshes the view of the components tree. Arguments none. Returns nothing. Data source functions data source files are stored in the configuration/datasources folder. Each server model ...

  • Page 329

    Extension data manager functions 329 • the allowdelete property is optional. If this property is set to a value of false , when the user clicks on this node in the bindings panel, the minus (-) button is disabled. If it is set to a value of true , the minus (-) button is enabled. If the property is ...

  • Page 330

    330 chapter 16: dynamic documents dreamweaver.Getextdataarray() availability dreamweaver ultradev 4. Description this function retrieves an array of values from an edml file for the specified nodes. Arguments qualifier(s) • the qualifier(s) argument is a variable-length list of comma-separated node ...

  • Page 331

    Live data functions 331 arguments value , qualifier(s) • the value argument is a property value or is blank to ignore. • the qualifier(s) argument is a variable length list of comma-separated node qualifiers of the required property. Returns dreamweaver expects an array of group names that have the ...

  • Page 332

    332 chapter 16: dynamic documents arguments none. Returns a string that contains the initialization tags. Dreamweaver.Getlivedatamode() availability dreamweaver ultradev 1. Description determines whether the live data window is currently visible. Arguments none. Returns a boolean value: true if the ...

  • Page 333

    Live data functions 333 in the url, these parameters would appear as shown in the following example: http://someurl?Id=22&name=samuel this function lets you obtain these live data settings through javascript. Arguments none. Returns an array that contains the url parameters for the current document....

  • Page 334

    334 chapter 16: dynamic documents returns an httpreply object. This object is the same as the value that the mmhttp.Gettext() function returns. If the user clicks the stop icon, the return value’s httpreply.Statuscode is equal to 200 (status ok) and its httpreply.Data is equal to the empty string. F...

  • Page 335

    Live data functions 335 dreamweaver.Setlivedataparameters() availability dreamweaver mx. Description sets the url parameters that you reference in your document for use in live data mode. Live data mode lets you view a web page in the design stage (as if it has been translated by the application ser...

  • Page 336

    336 chapter 16: dynamic documents server behavior functions server behavior functions let you manipulate the server behaviors panel, which you can display by selecting window > server behaviors. Using these functions, you can find all the server behaviors on a page and programmatically apply a new b...

  • Page 337

    Server behavior functions 337 dreamweaver.Serverbehaviorinspector.Getserverbehaviors() availability dreamweaver ultradev 1. Description gets a list of all the behaviors on the page. When dreamweaver determines that the internal list of server behaviors might be out of date, it calls the findserverbe...

  • Page 338

    338 chapter 16: dynamic documents server model functions in macromedia dreamweaver, each document has an associated document type. For dynamic document types, dreamweaver also associates a server model (such as asp-js, coldfusion, or php-mysql). Server models are used to group functionality that is ...

  • Page 339

    Server model functions 339 dom.Servermodel.Getdelimiters() availability dreamweaver mx. Description lets javascript code get the script delimiter for each server model, so managing the server model code can be separated from managing the user-scripted code. Arguments none. Returns an array of object...

  • Page 340

    340 chapter 16: dynamic documents returns a string, the value of which is the name of the folder. Dom.Servermodel.Getserverextension() (deprecated) availability dreamweaver ultradev 4; deprecated in dreamweaver mx. Description returns the default file extension of files that use the current server m...

  • Page 341

    Server model functions 341 example the following code snippet from a participant file shows a translator searchpatterns tag: /i]]> the search pattern contains a javascript regular expression that specifies two submatches (both of which are contained within parentheses). The first submatch is for the...

  • Page 342

    342 chapter 16: dynamic documents returns a javascript object that contains a variety of information that is specific to the current server model. Dom.Servermodel.Getserverlanguage() (deprecated) availability ultradev 1; deprecated in dreamweaver mx. Description determines the server model that is a...

  • Page 343

    Server model functions 343 dom.Servermodel.Getserversupportscharset() availability dreamweaver mx. Description determines whether the server model that is associated with the document supports the named character set. Note: in addition to letting you call this function from the javascript layer, dre...

  • Page 344

    344 chapter 16: dynamic documents dom.Servermodel.Testappserver() availability dreamweaver mx. Description tests whether a connection to the application server can be made. Arguments none. Returns a boolean value that indicates whether the request to connect to the application server was successful....

  • Page 345: Chapter 17

    345 chapter 17 design the design functions in macromedia dreamweaver mx 2004 perform operations related to designing the appearance of a document. These operations include functions that apply a specified cascading style sheet (css) style, split a selected frame vertically or horizontally, align sel...

  • Page 346

    346 chapter 17: design • the classorid argument, which is optional, is the attribute with which the style should be applied (either "class" or "id" ). If the elementnode argument is a null value or an empty string and no tag exactly surrounds the selection, the style is applied using span tags. If t...

  • Page 347

    Css functions 347 dreamweaver.Cssruletracker.Editselectedrule() availability dreamweaver mx 2004. Description lets the user edit the currently selected rule in the rule tracker. This function displays the selected rule in the css property grid, and if necessary, will show the property grid and its c...

  • Page 348

    348 chapter 17: design returns nothing. Enabler “dreamweaver.Cssstylepalette.Canapplyselectedstyle()” on page 449 . Dreamweaver.Cssstylepalette.Attachstylesheet() availability dreamweaver 4. Description displays a dialog box that lets users attach a style sheet to the current active document or to o...

  • Page 349

    Css functions 349 arguments none. Returns nothing. Enabler “dreamweaver.Cssstylepalette.Canduplicateselectedstyle()” on page 450 . Dreamweaver.Cssstylepalette.Editselectedstyle() availability dreamweaver 3. Description opens the style definition dialog box for the style that is currently selected in...

  • Page 350

    350 chapter 17: design dreamweaver.Cssstylepalette.Getmediatype() availability dreamweaver mx 2004. Description gets target media type for rendering. The default media type is "screen". Arguments none. Returns a string value that specifies the target media type. Example var mediatype = dw.Cssstylepa...

  • Page 351

    Css functions 351 dreamweaver.Cssstylepalette.Getselectedtarget() (deprecated) availability dreamweaver 3; deprecated in dreamweaver mx because there is no longer an apply to menu in the css styles panel. Description this function gets the selected element in the apply to pop-up menu at the top of t...

  • Page 352

    352 chapter 17: design dreamweaver.Cssstylepalette.Newstyle() availability dreamweaver 3. Description opens the new style dialog box. Arguments none. Returns nothing. Dreamweaver.Cssstylepalette.Setmediatype() availability dreamweaver mx 2004. Description sets the target media type for rendering. Re...

  • Page 353

    Frame and frameset functions 353 returns an array of strings where each string is the name of a frame in the current frameset. Any unnamed frames are skipped. If none of the frames in the frameset is named, an empty array returns. Example for a document that contains four frames (two of which are na...

  • Page 354

    354 chapter 17: design dom.Splitframe() availability dreamweaver 3. Description splits the selected frame vertically or horizontally. Arguments splitdirection • the splitdirection argument is a string that must specify one of the following directions: "up" , "down" , "left" , or "right" . Returns no...

  • Page 355

    Layer and image map functions 355 dom.Arrange() availability dreamweaver 3. Description moves the selected hotspots in the specified direction. Arguments tobackorfront • the tobackorfront argument is the direction in which the hotspots must move, either front or back. Returns nothing. Enabler “dom.C...

  • Page 356

    356 chapter 17: design arguments x, y • the x argument is the number of pixels that the selection must move horizontally. • the y argument is the number of pixels that the selection must move vertically. Returns nothing. Dom.Resizeselectionby() availability dreamweaver 3. Description resizes the cur...

  • Page 357

    Layout environment functions 357 arguments tagname • the tagname argument must be "layer" , "ilayer" , "div" , or "span" . Returns nothing. Layout environment functions layout environment functions handle operations that are related to the settings for working on a document. They affect the source, ...

  • Page 358

    358 chapter 17: design dom.Gettracingimageopacity() availability dreamweaver 3. Description gets the opacity setting for the document’s tracing image. Arguments none. Returns a value between 0 and 100, or nothing if no opacity is set. Enabler “dom.Hastracingimage()” on page 441 . Dom.Loadtracingimag...

  • Page 359

    Layout environment functions 359 dom.Playplugin() availability dreamweaver 3. Description plays the selected plug-in item. Arguments none. Returns nothing. Enabler “dom.Canplayplugin()” on page 438 . Dom.Setrulerorigin() availability dreamweaver 3. Description sets the origin of the ruler. Arguments...

  • Page 360

    360 chapter 17: design dom.Settracingimageposition() availability dreamweaver 3. Description moves the upper left corner of the tracing image to the specified coordinates. If the arguments are omitted, the adjust tracing image position dialog box appears. Arguments x , y • the x argument is the numb...

  • Page 361

    Layout environment functions 361 dom.Snaptracingimagetoselection() availability dreamweaver 3. Description aligns the upper left corner of the tracing image with the upper left corner of the current selection. Arguments none. Returns nothing. Enabler “dom.Hastracingimage()” on page 441 . Dom.Stopall...

  • Page 362

    362 chapter 17: design dreamweaver.Arrangefloatingpalettes() availability dreamweaver 3. Description moves the visible floating panels to their default positions. Arguments none. Returns nothing. Dreamweaver.Showgridsettingsdialog() availability dreamweaver 3. Description opens the grid settings dia...

  • Page 363

    Layout view functions 363 layout view functions layout view functions handle operations that change the layout elements within a document. They affect table, column, and cell settings, including position, properties, and appearance. Dom.Addspacertocolumn() availability dreamweaver 4. Description cre...

  • Page 364

    364 chapter 17: design dom.Createlayouttable() availability dreamweaver 4. Description creates a layout table in the current document at the specified position and dimensions, either within an existing table or in the area below the existing content on the page. If the table is created in an existin...

  • Page 365

    Layout view functions 365 dom.Doesgrouphavespacers() availability dreamweaver 4. Description determines whether the currently selected table contains a row of spacer images that dreamweaver generated. It fails if the current selection is not a table. Arguments none. Returns returns true if the table...

  • Page 366

    366 chapter 17: design dom.Getshowlayoutview() availability dreamweaver 4. Description determines the view for the current document; either layout or standard view. Arguments none. Returns returns true if the current document is in layout view; false if the document is in standard view. Dom.Iscolumn...

  • Page 367

    Layout view functions 367 dom.Removeallspacers() availability dreamweaver 4. Description removes all spacer images generated by dreamweaver from the currently selected table. This function fails if the current selection is not a table or if the operation is not successful. Arguments none. Returns no...

  • Page 368

    368 chapter 17: design arguments colnum , bautostretch • the colnum argument is the column to be automatically sized or set to a fixed width. • the bautostretch argument specifies whether to set the column to autostretch ( true ) or to a fixed width ( false ). Returns nothing. Dom.Setshowlayouttable...

  • Page 369

    Table editing functions 369 table editing functions table functions add and remove table rows and columns, change column widths and row heights, convert measurements from pixels to percents and back, and perform other standard table-editing tasks. Dom.Convertwidthstopercent() availability dreamweave...

  • Page 370

    370 chapter 17: design returns nothing. Enabler “dom.Candecreasecolspan()” on page 434 . Dom.Decreaserowspan() availability dreamweaver 3. Description this function decreases the row span by one. Arguments none. Returns nothing. Enabler “dom.Candecreaserowspan()” on page 434 . Dom.Deletetablecolumn(...

  • Page 371

    Table editing functions 371 arguments none. Returns nothing. Enabler “dom.Candeletetablerow()” on page 435 . Dom.Dodeferredtableupdate() availability dreamweaver 3. Description if the faster table editing option is selected in the general preferences, this function forces the table layout to reflect...

  • Page 372

    372 chapter 17: design dom.Gettableextent() availability dreamweaver 3. Description this function gets the number of columns and rows in the selected table. Arguments none. Returns an array that contains two whole numbers. The first array item is the number of columns, and the second array item is t...

  • Page 373

    Table editing functions 373 dom.Inserttablecolumns() availability dreamweaver 3. Description this function inserts the specified number of table columns into the current table. Arguments numberofcols , bbeforeselection • the numberofcols argument is the number of columns to insert. • the bbeforesele...

  • Page 374

    374 chapter 17: design dom.Mergetablecells() availability dreamweaver 3. Description this function merges the selected table cells. Arguments none. Returns nothing. Enabler “dom.Canmergetablecells()” on page 438 . Dom.Removealltableheights() availability dreamweaver 3. Description this function remo...

  • Page 375

    Table editing functions 375 dom.Removecolumnwidth() availability dreamweaver mx 2004. Description this function removes all width attributes from a single, selected column. Arguments none. Returns nothing. Dom.Selecttable() availability dreamweaver 3. Description selects an entire table. Arguments n...

  • Page 376

    376 chapter 17: design returns nothing. Dom.Settablecelltag() availability dreamweaver 3. Description this function specifies the tag for the selected cell. Arguments tdorth • the tdorth argument must be either "td" or "th" . Returns nothing. Dom.Settablecolumns() availability dreamweaver 3. Descrip...

  • Page 377

    Table editing functions 377 dom.Showinserttablerowsorcolumnsdialog() availability dreamweaver 3. Description this function opens the insert rows or columns dialog box. Arguments none. Returns nothing. Enabler “dom.Caninserttablecolumns()” on page 436 or “dom.Caninserttablerows()” on page 437 . Dom.S...

  • Page 378

    378 chapter 17: design 000_dw_api_print.Book page 378 wednesday, august 20, 2003 9:14 am.

  • Page 379: Chapter 18

    379 chapter 18 code the code functions let you perform operations on a document that appears in code view. These operations include adding new menu or function tags to a code hints menu, finding and replacing string patterns, deleting the current selection from a document, printing all or selected c...

  • Page 380

    380 chapter 18: code dreamweaver.Codehints.Addmenu() availability dreamweaver mx. Description dynamically defines a new menu tag in the codehints.Xml file. If there is an existing menu tag that has the same pattern and document type, this function adds items to the existing menu. Arguments menugroup...

  • Page 381

    Code functions 381 example if the user creates a record set called " myrs ", the following code would create a menu for myrs : dw.Codehints.Addmenu( "codehints_object_methods", // menu is enabled if object methods are enabled "myrs.", // pop up menu if user types "myrs." new array("firstname", "last...

  • Page 382

    382 chapter 18: code dreamweaver.Codehints.Resetmenu() availability dreamweaver mx. Description resets the specified menu tag or function tag to its state immediately after dreamweaver reads the codehints.Xml file. In other words, a call to this function erases the effect of previous calls to the ad...

  • Page 383

    Find/replace functions 383 dreamweaver.Reloadcodecoloring() description reloads code coloring files from the dreamweaver configuration/code coloring folder. Arguments none. Returns nothing. Example dreamweaver.Reloadcodecoloring() find/replace functions find/replace functions handle find and replace...

  • Page 384

    384 chapter 18: code dreamweaver.Replace() availability dreamweaver 3. Description verifies that the current selection matches the search criteria that was specified by dreamweaver.Setupfindreplace() , by dreamweaver.Setupcomplexfindreplace() , or by the user in the replace dialog box; the function ...

  • Page 385

    Find/replace functions 385 returns nothing. Example the first line of the following example sets up a tag search and specifies that the scope of the search should be the current document. The second line performs the search operation. Dreamweaver.Setupcomplexfind(' ignorewhitespace="true" useregexp=...

  • Page 386

    386 chapter 18: code dreamweaver.Setupfind() availability dreamweaver 3. Description prepares for a text or html source search by defining the search parameters for a subsequent dreamweaver.Findnext() operation. Arguments searchobject the searchobject argument is an object for which the following pr...

  • Page 387

    Find/replace functions 387 dreamweaver.Setupfindreplace() availability dreamweaver 3. Description prepares for a text or html source search by defining the search parameters and the scope for a subsequent dreamweaver.Replace() or dreamweaver.Replaceall() operation. Arguments searchobject the searcho...

  • Page 388

    388 chapter 18: code dreamweaver.Showfinddialog() availability dreamweaver 3. Description opens the find dialog box. Arguments none. Returns nothing. Enabler “dreamweaver.Canshowfinddialog()” on page 448 . Dreamweaver.Showfindreplacedialog() availability dreamweaver 3. Description opens the replace ...

  • Page 389

    General editing functions 389 general editing functions you handle general editing functions in the document window. These functions insert text, html, and objects; apply, change, and remove font and character markup; modify tags and attributes; and more. Dom.Applycharactermarkup() availability drea...

  • Page 390

    390 chapter 18: code dom.Deleteselection() availability dreamweaver 3. Description deletes the selection in the document. Arguments none. Returns nothing. Dom.Editattribute() availability dreamweaver 3. Description displays the appropriate interface for editing the specified document attribute. In m...

  • Page 391

    General editing functions 391 dom.Getcharset() availability dreamweaver 4. Description returns the charset attribute in the meta tag of the document. Arguments none. Returns the encoding identity of the document. For example, for a latin1 document, the function returns iso-8859-1 . Dom.Getfontmarkup...

  • Page 392

    392 chapter 18: code dom.Getlinkhref() availability dreamweaver 3. Description gets 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 getattribute('href') on the li...

  • Page 393

    General editing functions 393 dom.Gettextalignment() availability dreamweaver 3. Description gets the alignment of the block that contains the selection. Arguments none. Returns a string that contains the value of the align attribute for the tag that is associated with the block or an empty string i...

  • Page 394

    394 chapter 18: code returns a boolean value that indicates whether the entire selection has the specified character markup. The function returns a value of false if only part of the selection has the specified markup. Dom.Indent() availability dreamweaver 3. Description indents the selection using ...

  • Page 395

    General editing functions 395 the result appears in the document window, as shown in the following figure: dom.Insertobject() availability dreamweaver 3. Description inserts the specified object, prompting the user for parameters if necessary. Arguments objectname • the objectname argument is the na...

  • Page 396

    396 chapter 18: code example the following code inserts the text: 130 into the current document: var thedom = dreamweaver.Getdocumentdom(); thedom.Inserttext('130'); the results appear in the document window, as shown in the following figure: dom.Newblock() availability dreamweaver 3. Description cr...

  • Page 397

    General editing functions 397 dom.Outdent() availability dreamweaver 3. Description outdents the selection. Arguments none. Returns nothing. Dom.Removecharactermarkup() availability dreamweaver 3. Description removes the specified type of character markup from the selection. Arguments tagname • the ...

  • Page 398

    398 chapter 18: code dom.Removelink() availability dreamweaver 3. Description removes the hypertext link from the selection. Arguments none. Returns nothing. Dom.Resizeselection() availability dreamweaver 3. Description resizes the selected object to the specified dimensions. Arguments newwidth , ne...

  • Page 399

    General editing functions 399 returns nothing. Dom.Setlinkhref() availability dreamweaver 3. Description makes the selection a hypertext link or changes the url value of the href tag that encloses the current selection. Arguments linkhref • the linkhref argument is the url (document-relative path, r...

  • Page 400

    400 chapter 18: code dom.Setlistboxkind() availability dreamweaver 3. Description changes the kind of the selected select menu. Arguments kind • the kind argument must be either "menu" or "list box" . Returns nothing. Dom.Showlistpropertiesdialog() availability dreamweaver 3. Description opens the l...

  • Page 401

    General editing functions 401 dom.Settextalignment() availability dreamweaver 3. Description sets the align attribute of the block that contains the selection to the specified value. Arguments alignvalue • the alignvalue argument must be "left" , "center" , or "right" . Returns nothing. Dom.Settextf...

  • Page 402

    402 chapter 18: code dom.Showfontcolordialog() availability dreamweaver 3. Description opens the color picker dialog box. Arguments none. Returns nothing. Dreamweaver.Deleteselection() availability dreamweaver 3. Description deletes the selection in the active document or the site panel; on the maci...

  • Page 403

    General editing functions 403 dreamweaver.Getfontlist() availability dreamweaver 3. Description gets a list of all the font groups that appear in the text property inspector and in the style definition dialog box. Arguments none. Returns an array of strings that represent each item in the font list....

  • Page 404

    404 chapter 18: code dreamweaver.Getkeystate() availability dreamweaver 3. Description determines whether the specified modifier key is depressed. Arguments key • the key argument must be one of the following values: "cmd" , "ctrl" , "alt" , or "shift" . In windows, "cmd" and "ctrl" refer to the con...

  • Page 405

    Print function 405 dreamweaver.Getsystemfontlist() availability dreamweaver 4. Description returns a list of fonts for the system. This function can get either all fonts or only truetype fonts. These fonts are needed for the flash text object. Arguments fonttypes • the fonttypes argument is a string...

  • Page 406

    406 chapter 18: code example the following example calls dw.Printcode() to invoke the print dialog box for the user’s document. If the function returns the value false , the code displays an alert to inform the user that it cannot execute the print request. Var thedom = dreamweaver.Getdocumentdom("d...

  • Page 407

    Quick tag editor functions 407 dom.Striptag() availability dreamweaver 3. Description removes the tag from around the current selection, leaving any contents. If the selection has no tags or contains more than one tag, dreamweaver reports an error. Arguments none. Returns nothing. Dom.Wraptag() avai...

  • Page 408

    408 chapter 18: code arguments {nearwhat} , {mode} • the optional nearwhat argument, if specified, must be either "selection" or "tag selector" . If this argument is omitted, the default value is "selection" . • the optional mode argument, if specified, must be "default" , "wrap" , "insert" , or "ed...

  • Page 409

    Code view functions 409 arguments none. Returns nothing. Dom.Getshownoscript() availability dreamweaver mx. Description gets the current state of the noscript content option (from the view > noscript content menu option). On by default, the noscript tag identifies page script content that can be ren...

  • Page 410

    410 chapter 18: code dom.Isdesignviewupdated() availability dreamweaver 4. Description determines whether the design view and text view content is synchronized for those dreamweaver operations that require a valid document state. Arguments none. Returns a boolean value: true if the design view (wysi...

  • Page 411

    Code view functions 411 returns nothing. Dom.Source.Arrowdown() availability dreamweaver 4. Description moves the insertion point down the code view document, line by line. If content is already selected, this function extends the selection line by line. Arguments {ntimes} , {bshiftisdown} • the nti...

  • Page 412

    412 chapter 18: code dom.Source.Arrowright() availability dreamweaver 4. Description moves the insertion point to the right in the current line of the code view. If content is already selected, this function extends the selection to the right. Arguments {ntimes} , {bshiftisdown} • the ntimes argumen...

  • Page 413

    Code view functions 413 dom.Source.Balancebracestextview() availability dreamweaver 4. Description this function is a code view extension that enables parentheses balancing. You can call dom.Source.Balancebracestextview() to extend a currently highlighted selection or insertion point from the openin...

  • Page 414

    414 chapter 18: code returns nothing. Dom.Source.Endpage() availability dreamweaver 4. Description moves the insertion point to the end of the current page or to the end of the next page if the insertion point is already at the end of a page. If content is already selected, this function extends the...

  • Page 415

    Code view functions 415 returns a pair of integers that represent offsets from the beginning of the source document. The first integer is the opening of the selection; the second is the closing of the selection. If the two numbers are equal, the selection is an insertion point. If there is no select...

  • Page 416

    416 chapter 18: code arguments offset, {searchdirection} • the offset argument is a number that specifies the offset in the code for which the function will return any errors. • the searchdirection argument, which is optional, is a string that specifies " empty ", " forward" or " back". If specified...

  • Page 417

    Code view functions 417 dom.Source.Insert() availability dreamweaver 4. Description inserts the specified string into the source code at the specified offset from the beginning of the source file. If the offset is not greater than or equal to zero, the insertion fails and the function returns false ...

  • Page 418

    418 chapter 18: code arguments none. Returns nothing. Dom.Source.Pagedown() availability dreamweaver 4. Description moves the insertion point down the code view document, page by page. If content is already selected, this function extends the selection page by page. Arguments {ntimes} , {bshiftisdow...

  • Page 419

    Code view functions 419 dom.Source.Previousword() availability dreamweaver 4. Description moves the insertion point to the beginning of the previous word (or words, if specified) in code view. If content is already selected, this function extends the selection to the left. Arguments {ntimes} , {bshi...

  • Page 420

    420 chapter 18: code dom.Source.Scrollendfile() availability dreamweaver 4. Description scrolls the code view to the bottom of the document file without moving the insertion point. Arguments none. Returns nothing. Dom.Source.Scrolllinedown() availability dreamweaver 4. Description scrolls the code v...

  • Page 421

    Code view functions 421 dom.Source.Scrollpagedown() availability dreamweaver 4. Description scrolls the code view down page by page without moving the insertion point. Arguments ntimes • the ntimes argument is the number of pages to scroll. If ntimes is omitted, the default is 1. Returns nothing. Do...

  • Page 422

    422 chapter 18: code dom.Source.Selectparenttag() availability dreamweaver 4. Description this function is a code view extension that enables tag balancing. You can call dom.Source.Selectparenttag() to extend a currently highlighted selection or insertion point from the surrounding open tag to the c...

  • Page 423

    Code view functions 423 returns nothing. Dom.Source.Startofline() availability dreamweaver 4. Description places the insertion point at the beginning of the current line. If content is already selected, this function extends the selection to the beginning of the current line. Arguments bshiftisdown ...

  • Page 424

    424 chapter 18: code dom.Source.Wrapselection() availability dreamweaver 4. Description inserts the text of starttag before the current selection and the text of endtag after the current selection. The function then selects the entire range between, and including, the inserted tags. If the current s...

  • Page 425

    Tag editor and tag library functions 425 tag editor and tag library functions you can use tag editors to insert new tags, edit existing tags, and access reference information about tags. The tag chooser lets users organize their tags so that they can easily select frequently used tags. The tag libra...

  • Page 426

    426 chapter 18: code dreamweaver.Popupedittagdialog() availability dreamweaver mx. Description if a tag is selected, this function opens the tag editor for that tag, so you can edit the tag. Arguments none. Returns nothing. Enabler “dreamweaver.Canpopupedittagdialog()” on page 445 . Dreamweaver.Show...

  • Page 427

    Tag editor and tag library functions 427 dreamweaver.Taglibrary.Gettaglibrarydom() availability dreamweaver mx. Description given the url of a filename.Vtm file, this function returns the dom for that file, so that its contents can be edited. This function should be called only when the tag library ...

  • Page 428

    428 chapter 18: code dreamweaver.Taglibrary.Importdtdorschema() availability dreamweaver mx. Description this function imports a dtd or schema file from a remote server into the tag library. Arguments fileurl, prefix • the fileurl argument is the path to dtd or schema file, in local url format. • th...

  • Page 429

    Tag editor and tag library functions 429 example: the following example shows that using the dw.Taglibrary.Getimportedtaglist() function can get an array of tags from the libname library: // "fileurl" and "prefix" have been entered by the user. // tell the tag library to import the dtd/schema var li...

  • Page 430

    430 chapter 18: code 000_dw_api_print.Book page 430 wednesday, august 20, 2003 9:14 am.

  • Page 431: Chapter 19

    431 chapter 19 enablers macromedia dreamweaver mx 2004 enabler functions determine whether another function can perform a specific operation in the current context. The function specifications describe the general circumstances under which each function returns a true value. However, the description...

  • Page 432

    432 chapter 19: enablers dom.Canapplytemplate() availability dreamweaver 3. Description checks whether dreamweaver can perform an apply to page operation. This function is valid only for the active document. Arguments none. Returns a boolean value that indicates whether the document is not a library...

  • Page 433

    Enablers 433 dom.Canclippaste() availability dreamweaver 3. Description checks whether dreamweaver can perform a paste operation. Arguments none. Returns a boolean value: true if the clipboard contains any content that can be pasted into dreamweaver; false otherwise. Dom.Canclippastetext() availabil...

  • Page 434

    434 chapter 19: enablers dom.Canconverttablestolayers() availability dreamweaver 3. Description checks whether dreamweaver can perform a convert tables to layers operation. Arguments none. Returns a boolean value: true if all the content in the body section of the document is contained within tables...

  • Page 435

    Enablers 435 dom.Candeletetablecolumn() availability dreamweaver 3. Description checks whether dreamweaver can perform a delete column operation. Arguments none. Returns a boolean value: true if the insertion point is inside a cell or if a cell or column is selected; false otherwise. Dom.Candeleteta...

  • Page 436

    436 chapter 19: enablers dom.Canincreasecolspan() availability dreamweaver 3. Description checks whether dreamweaver can perform an increase colspan operation. Arguments none. Returns a boolean value: true if there are any cells to the right of the current cell; false otherwise. Dom.Canincreaserowsp...

  • Page 437

    Enablers 437 dom.Caninserttablerows() availability dreamweaver 3. Description checks whether dreamweaver can perform an insert row(s) operation. Arguments none. Returns a boolean value: true if the selection is inside a table; false if the selection is an entire table or is not inside a table. Dom.C...

  • Page 438

    438 chapter 19: enablers dom.Canmergetablecells() availability dreamweaver 3. Description checks whether dreamweaver can perform a merge cells operation. Arguments none. Returns a boolean value: true if the selection is an adjacent grouping of table cells; false otherwise. Dom.Canplayplugin() availa...

  • Page 439

    Enablers 439 dom.Canremoveeditableregion() availability dreamweaver 3. Description checks whether dreamweaver can perform an unmark editable region operation. Arguments none. Returns a boolean value: true if the current document is a template; false otherwise. Dom.Canselecttable() availability dream...

  • Page 440

    440 chapter 19: enablers dom.Canshowlistpropertiesdialog() availability dreamweaver 3. Description checks whether dreamweaver can show the list properties dialog box. Arguments none. Returns a boolean value: true if the selection is within an li tag; false otherwise. Dom.Cansplitframe() availability...

  • Page 441

    Enablers 441 dom.Canstopplugin() availability dreamweaver 3. Description checks whether dreamweaver can perform a stop operation. Arguments none. Returns a boolean value: true if the selection is currently being played with a plug-in; false otherwise. Dom.Canundo() availability dreamweaver 3. Descri...

  • Page 442

    442 chapter 19: enablers dreamweaver.Assetpalette.Canedit() availability dreamweaver 4. Description enables menu items in the assets panel for editing. Arguments none. Returns returns a boolean value: true if the asset can be edited; false otherwise. Returns a false value for colors and urls in the ...

  • Page 443

    Enablers 443 dreamweaver.Canclipcut() availability dreamweaver 3. Description checks whether dreamweaver can perform a cut operation. Arguments none. Returns a boolean value: true if there is any selected content that can be cut to the clipboard; false otherwise. Dreamweaver.Canclippaste() availabil...

  • Page 444

    444 chapter 19: enablers dreamweaver.Canexportcss() availability dreamweaver 3. Description checks whether dreamweaver can perform an export css styles operation. Arguments none. Returns a boolean value: true if the document contains any class styles that are defined in the head section; false other...

  • Page 445

    Enablers 445 returns a boolean value: true if a search pattern has already been established; false otherwise. Dreamweaver.Canopeninframe() availability dreamweaver 3. Description checks whether dreamweaver can perform an open in frame operation. Arguments none. Returns a boolean value: true if the s...

  • Page 446

    446 chapter 19: enablers dreamweaver.Canredo() availability dreamweaver 3. Description checks whether dreamweaver can perform a redo operation in the current context. Arguments none. Returns a boolean value that indicates whether any operations can be undone. Dreamweaver.Canrevertdocument() availabi...

  • Page 447

    Enablers 447 dreamweaver.Cansavedocument() availability dreamweaver 3. Description checks whether dreamweaver can perform a save operation on the specified document. Arguments documentobject • the documentobject argument is the root of a document’s dom (the same value that the dreamweaver.Getdocumen...

  • Page 448

    448 chapter 19: enablers dreamweaver.Cansaveframesetas() availability dreamweaver 3. Description checks whether dreamweaver can perform a save frameset as operation on the specified document. Arguments documentobject • the documentobject argument is the root of a document’s dom (the same value that ...

  • Page 449

    Enablers 449 dreamweaver.Canundo() availability dreamweaver 3. Description checks whether dreamweaver can perform an undo operation in the current context. Arguments none. Returns a boolean value that indicates whether any operations can be undone. Dreamweaver.Cssruletracker.Caneditselectedrule() av...

  • Page 450

    450 chapter 19: enablers returns a boolean value: true if the selected style has a class selector; false otherwise. Dreamweaver.Cssstylepalette.Candeleteselectedstyle() availability dreamweaver mx. Description checks the current selection to determine whether the selected style can be deleted. Argum...

  • Page 451

    Enablers 451 dreamweaver.Cssstylepalette.Caneditstylesheet() availability dreamweaver mx. Description checks the current selection to see whether it contains style sheet elements that can be edited. Arguments none. Returns a boolean value: true if the selection is a style sheet node or a style defin...

  • Page 452

    452 chapter 19: enablers dreamweaver.Resultspalette.Canclear() availability dreamweaver mx. Description checks whether you can clear the contents of the results panel that is currently in focus. Arguments none. Returns a boolean value: true if the contents can clear; false otherwise. Dreamweaver.Res...

  • Page 453

    Enablers 453 dreamweaver.Resultspalette.Canpaste() availability dreamweaver mx. Description checks whether the current results window can display a paste message in its contents. Arguments none. Returns a boolean value: true if the contents can display; false otherwise. Dreamweaver.Resultspalette.Ca...

  • Page 454

    454 chapter 19: enablers dreamweaver.Resultspalette.Cansave() availability dreamweaver mx. Description checks whether the save dialog box can open for the current panel. Currently, the site reports, target browser check, validation, and link checker panels support the save dialog box. Arguments none...

  • Page 455

    Enablers 455 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...

  • Page 456

    456 chapter 19: enablers site.Canchangelink() availability dreamweaver 3. Description checks whether dreamweaver can perform a change link operation. Arguments none. Returns a boolean value: true if an html or flash file links to the selected file in the site map; false otherwise. Site.Cancheckin() ...

  • Page 457

    Enablers 457 arguments siteorurl • the siteorurl 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 all the following conditions are true; false otherwise: • a remote site h...

  • Page 458

    458 chapter 19: enablers site.Canfindlinksource() availability dreamweaver 3. Description checks whether dreamweaver can perform a find link source operation. Arguments none. Returns a boolean value that indicates that the selected link in the site map is not the home page. Site.Canget() availabilit...

  • Page 459

    Enablers 459 returns one of the following values: • if the first argument is the keyword local and the second argument is a url, a boolean value that indicates whether the document belongs to a site • if the first argument is the keyword remote and the second argument is a url, a boolean value that ...

  • Page 460

    460 chapter 19: enablers site.Canopen() availability dreamweaver 3. Description checks whether dreamweaver can open the files or folders that are currently selected in the site panel. Arguments none. Returns a boolean value: true if any files or folders are selected in the site panel; false otherwis...

  • Page 462

    462 chapter 19: enablers site.Canselectallcheckedoutfiles() availability dreamweaver 4. Description determines whether the current working site has the check in/check out feature enabled. Arguments none. Returns a boolean value: true if the site allows check in/check out; false otherwise. Site.Canse...

  • Page 463

    Enablers 463 site.Cansynchronize() availability dreamweaver 3. Description determines whether dreamweaver can perform a synchronize operation. Arguments none. Returns a boolean value that indicates whether a remote site has been defined. Site.Canuncloak() availability dreamweaver mx. Description det...

  • Page 464

    464 chapter 19: enablers site.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 or flash file; false otherwise. 000_dw_api_print.Book page 464 wed...

  • Page 465: Index

    465 index a addbehavior() 303 adddebugcontextdata() 181 additem() 173 addlinktoexistingfile() 221 addlinktonewfile() 221 addresultitem() 174 addspacertocolumn() 363 align() 354 apis, types of database 77 database connection dialog box 105 design note 52 file i/o 33 fireworks integration 63 flash obj...

  • Page 466

    466 index cancheckin() 456 cancheckout() 456 canclear() 452 canclipcopy() 442 canclipcopytext() 432 canclipcut() 443 canclippaste() 433, 443 canclippastetext() 433 cancloak() 457 canconnect() 457 canconvertlayerstotable() 433 canconverttablestolayers() 434 cancopy() 452 cancut() 452 candecreasecolsp...

  • Page 467

    Index 467 codehints.Addfunction() 381, 382 codehints.Addmenu() 380 codehints.Resetmenu() 382 codehints.Showcodehints() 382 coldfusion component explorer 229, 233 columns getting from statements 91 getting from stored procedures 96 command menu functions 250 connection definition file 109 connection ...

  • Page 468

    468 index database connection dialog box api 105 definition files 109 include files, generated 108 database connection functions 78 database connection type definition files 109 database connectivity api applyconnection() 107 findconnection() 105 inspectconnection() 107 databases access functions 91...

  • Page 469

    Index 469 dom.Convertlayerstotable() 249 dom.Converttablestolayers() 250 dom.Converttoxhtml() 252 dom.Convertwidthstopercent() 369 dom.Convertwidthstopixels() 369 dom.Createlayoutcell() 363 dom.Createlayouttable() 364 dom.Decreasecolspan() 369 dom.Decreaserowspan() 370 dom.Deletekey() 165 dom.Delete...

  • Page 470

    470 index dom.Makecellwidthsconsistent() 366 dom.Makesizesequal() 355 dom.Markselectionaseditable() 320 dom.Mergetablecells() 374 dom.Moveselectionby() 355 dom.Newblock() 396 dom.Neweditableregion() 321 dom.Nextparagraph() 166 dom.Nextword() 167 dom.Nodetooffsets() 280 dom.Notifyflashobjectchanged()...

  • Page 471

    Index 471 dom.Showfontcolordialog() 402 dom.Showinfomessagepopup() 269 dom.Showinserttablerowsorcolumnsdialog() 377 dom.Showlistpropertiesdialog() 400 dom.Showpagepropertiesdialog() 270 dom.Snaptracingimagetoselection() 361 dom.Source.Arrowdown() 411 dom.Source.Arrowleft() 411 dom.Source.Arrowright(...

  • Page 472

    472 index dreamweaver.Canopeninframe() 445 dreamweaver.Canplayrecordedcommand() 445 dreamweaver.Canpopupedittagdialog() 445 dreamweaver.Canredo() 446 dreamweaver.Canrevertdocument() 446 dreamweaver.Cansaveall() 446 dreamweaver.Cansavedocument() 447 dreamweaver.Cansavedocumentastemplate() 447 dreamwe...

  • Page 473

    Index 473 dreamweaver.Getrecentfilelist() 260 dreamweaver.Getredotext() 154 dreamweaver.Getsecondarybrowser() 145 dreamweaver.Getservermodels() 344 dreamweaver.Getshowdialogsoninsert() 149 dreamweaver.Getshowstatusbar() 195 dreamweaver.Getsiteroot() 278 dreamweaver.Getsnapdistance() 212 dreamweaver....

  • Page 474

    474 index dreamweaver.Resultspalette.Cut() 178 dreamweaver.Resultspalette.Debugwindow.Adddebugc ontextdata() 181 dreamweaver.Resultspalette.Openinbrowser() 179 dreamweaver.Resultspalette.Openineditor() 179 dreamweaver.Resultspalette.Paste() 178 dreamweaver.Resultspalette.Save() 179 dreamweaver.Resul...

  • Page 475

    Index 475 dwfile.Setattributes() 41 dwfile.Write() 42 e editattribute() 390 editcolumns() 226 editcommandlist() 250 editfontlist() 402 editlockedregions() 290 editselectedrule() 347 editselectedstyle() 349 editsnippet() 325 editstylesheet() 349 edml file functions 329 enabler functions 431 enablers ...

  • Page 476

    476 index getattributes() 35 getautovalidationcount() 409 getbehavior() 304 getbehaviorat() 308 getbehaviorcount() 308 getbehaviorelement() 305 getbehaviorevent() 306 getbehaviortag() 306 getbrowserlist() 142 getcharset() 391 getcheckoutuser() 230 getcheckoutuserforfile() 230 getclasses() 111 getcla...

  • Page 477

    Index 477 getpreventlayeroverlaps() 183 getprimarybrowser() 144 getprimaryextensioneditor() 144 getprimarykeys() 94 getprimaryview() 212 getprocedures() 94 getproperties() 111 getrdspassword() 84 getrdsusername() 84 getrecentfilelist() 260 getredotext() 154 getremotedsnlist() 84 getrulerorigin() 357...

  • Page 478

    478 index getview() 208 getviews() 99 getwindowtitle() 208 global application functions 148 global document functions 267 h hascharactermarkup() 393 hasconnectionwithname() 86 hastracingimage() 441 hideinfomessagepopup() 268 history functions 153 hotspot functions 354 html cascading style sheets 249...

  • Page 479

    Index 479 loadtracingimage() 358 localurltofilepath() 61 locateinsite() 235 m makecellwidthsconsistent() 366 makeeditable() 236 makenewdreamweaverfile() 236 makenewfolder() 237 makesizesequal() 355 mapkeycodetochar() 170 markselectionaseditable() 320 maylaunchfireworks() 66 menu functions 170 merget...

  • Page 480

    480 index newrule() 347 newsite() 237 newsnippet() 324 newstyle() 352 nextparagraph() 166 nextword() 167, 417 nodeexists() 283 nodetooffsets() 280 dreamweaver.Nodetooffsets() 284 _notes folder 51 notifyflashobjectchanged() 396 notifymenuupdated() 171 o offsetstonode() 281 dreamweaver.Offsetstonode()...

  • Page 481

    Index 481 resizeselection() 398 resizeselectionby() 356 results window functions 172 resultspalette.Canclear() 452 resultspalette.Cancopy() 452 resultspalette.Cancut() 452 resultspalette.Canopeninbrowser() 453 resultspalette.Canopenineditor() 453 resultspalette.Canpaste() 453 resultspalette.Cansave(...

  • Page 482

    482 index selectchild() 406 selecthomepage() 241 selection functions 279 selectnewer() 242 selectparent() 406 selectparenttag() 422 selecttable() 375 server behaviors functions 336 components functions 327 debugging 180 serverdebuginfo 181 set() 56 setactivewindow() 213 setashomepage() 242 setattrib...

  • Page 483

    Index 483 showcoldfusionadmin() 88 showconnectionmgrdialog() 89 showdynamicdata() 150 showfinddialog() 388 showfindreplacedialog() 388 showfontcolordialog() 402 showgridsettingsdialog() 362 showinfomessagepopup() 269 showinserttablerowsorcolumnsdialog() 377 showlistpropertiesdialog() 400 showlivedat...

  • Page 484

    484 index site.Remoteisvalid() 239 site.Removelink() 240 site.Renameselection() 240 site.Runvalidation() 240 site.Saveasimage() 241 site.Selectall() 241 site.Selecthomepage() 241 site.Selectnewer() 242 site.Setashomepage() 242 site.Setcloakingenabled() 242 site.Setconnectionstate() 243 site.Setcurre...

  • Page 485

    Index 485 stored procedures 91 getting columns from 96 getting parameters for 98 showing results of 101, 102 striptag() 407 swffile.Createfile() 73 swffile.Getnaturalsize() 74 swffile.Getobjecttype() 75 swffile.Readfile() 75 synchronize() 245 synchronizedocument() 424 t table editing functions 369 t...

  • Page 486

    486 index 000_dw_api_print.Book page 486 wednesday, august 20, 2003 9:14 am.