background image

124

Chapter 7 Using Web Development Languages

The validator checks every tag as soon as you enter its closing bracket (

>

). It does 

not validate a tag whose closing bracket was entered automatically, for example 
by a tag editor or from a QuickBar toolbutton.

If something is wrong in the tag, an error message appears in red in the status bar.

Using the CSE HTML Validator

If you have installed this HTML validation tool, you can run it from H for 
Dreamweaver MX. The CSE Validator supports multiple languages and contains 
other useful features. 

For more information, open the 

Options > Settings >Validation

 pane and click the 

CSE HTML Validator link to visit their website.

To use the CSE HTML Validator:

1

In  the 

Options > Settings > Validation

 pane, select Use CSE HTML Validator 

when validating the entire document.

2

Click Configure CSE.

3

Complete the CSE HTML Validator Pro Configuration Editor dialog box.

For a description of each field on a tab, click Help.

4

Click CSE Options.

5

Complete the Validator Engine Options (Validator/Logging/Tools/Network) 
dialog box.

For a description of each field on a tab, click Help.

6

(Optional) To visit their website, click the CSE HTML Validator link.

7

When you are done, click Apply.

Summary of Contents for HOMESITE

Page 1: ...Macromedia Incorporated Using HomeSite for Dreamweaver MX HomeSite for Dreamweaver MX for Windows 98 Windows ME Windows NT 4 0 Windows 2000 and Windows XP...

Page 2: ...be trademarks or registered trademarks of others This manual as well as the software described in it is furnished under license and may be used or copied only in accordance with the terms of such lic...

Page 3: ...x Chapter 1 Setting Up the Product 1 System requirements 2 Installing or upgrading 2 Completing the setup 3 About the Initial Configuration Wizard 3 Using the Initial Configuration Wizard 4 Monitoring...

Page 4: ...Help system 35 Opening Help in tag editors and Tag Chooser 35 Editing Help in tag editors and Tag Chooser 35 Accessing online Help 35 Printing Help 35 Bookmarking Help 36 Searching the online Help 36...

Page 5: ...nippet 64 Resources for website accessibility 65 Tips for visually impaired users 66 Assigning keyboard shortcuts 66 Working with user interface elements 67 Chapter 6 Editing Pages 69 Setting editor o...

Page 6: ...Validating XHTML code 105 Using regular expressions 107 About regular expressions 107 Writing regular expressions 107 Using a special character 108 Creating a single character regular expression 108...

Page 7: ...ct folders 138 About the project file 139 Creating a project 140 Setting project options 140 Creating a project 141 Populating a project 141 Working with a project 144 Using the Projects tab 144 Manag...

Page 8: ...b Pages 171 Working in the Results window 172 Opening the Results window 172 Saving results 173 Searching documents 174 Selecting search text 174 Saving search text 174 Using basic search commands 175...

Page 9: ...with tag data 205 Generating a tag 205 Adding tag Help 208 Container and Control examples 209 TabDialog 209 TabPage 209 Panel 209 Label 210 DropDown 210 ListBox 210 FontPicker 211 ColorPicker 211 Che...

Page 10: ...ds 252 ActiveDocument object 258 Properties 258 Methods 262 DocumentCache object 269 Properties 269 Project object 272 Properties 272 Methods 272 ProjectManager object 274 Properties 274 Methods 274 F...

Page 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...

Page 12: ...xii Contents...

Page 13: ...product s user interface and the productivity tools that you can use to quickly develop high quality applications and web content Contents Intended audience xiv Developer resources xiv About the docu...

Page 14: ...omedia com Product information Detailed product information on Macromedia products and related topics www macromedia com software Technical support Macromedia HomeSite Support Center with links to man...

Page 15: ...f the popular print journal at http www sys con com coldfusion index2 cfmwww sys con com coldfusion index2 cfm a Tutorials The World Wide Web Consortium W3C at www W3Schools com offers free web tutori...

Page 16: ...umentation You can view Help for a specific tag Help topics in HTML format or online documentation in Adobe Acrobat PDF format To view Help for a tag Position the cursor in a tag and press F1 or right...

Page 17: ...Dreamweaver MX section of the Macromedia website Printing online documentation You can print one Help topic at a time in the HTML Help or print as many pages of the Help as you need from the Adobe Acr...

Page 18: ...to see the HomeSite for Dreamweaver MX developer community in action Contacting Macromedia Corporate headquarters Macromedia Inc 600 Townsend Street San Francisco CA 94103 Tel 415 252 2000 Fax 415 626...

Page 19: ...1 1996 The Drag Drop Component Suite Copyright 1997 1999 Version 3 7 by Angus Johnson Anders Melander All Rights Reserved Copyright 1999 Bradley D Stowers Copyright 1996 2000 Plasmatech Software Desig...

Page 20: ...xx About This Book...

Page 21: ...oduct This chapter describes how to install or upgrade HomeSite for Dreamweaver MX and how to initially configure it Contents System requirements 2 Installing or upgrading 2 Completing the setup 3 Mon...

Page 22: ...mweaver MX The installation also installs TopStyle 2 1 Lite its integrated style sheet editor unless your computer already has TopStyle version 2 1 or 2 5 installed Do not install an earlier version o...

Page 23: ...reamweaver MX if you have installed it for the first time and how to set up HomeSite for Dreamweaver MX based on the options that were set in a previous version The Initial Configuration Wizard ICW gu...

Page 24: ...your selections you can click Back and make changes if necessary and then click Finish The initial configuration is complete and you can start using HomeSite for Dreamweaver MX To complete the ICW af...

Page 25: ...n and you want to keep it turned on in the current version select Auto Completion Click Next 6 In the Debug Settings dialog box add modify or delete RDS server configurations Click Next 7 In the Debug...

Page 26: ...ME systems see the Windows 9 x System Resources article on http www windows help net techfiles win resources htmlInfiniSource a After reclaiming these resources if you still encounter difficulties wi...

Page 27: ...e monitor You should configure the Resource Level Monitor if your system crashes without having been warned or if you are being warned frequently or unnecessarily You can adjust monitor options until...

Page 28: ...8 Chapter 1 Setting Up the Product...

Page 29: ...ring Browsers and Servers This chapter contains instructions for setting up browsers and servers Contents Configuring the internal browser 10 Configuring an external browser 12 Working with files on r...

Page 30: ...ectly install and configure the Mozilla browser NGLayout Gecko control Please note that the Mozilla control is under continual development and could lack stability For setup instructions To install an...

Page 31: ...e Mozilla bin directory For example if the bin directory is in D mozilla enter d and then enter cd mozilla bin 6 Enter regsvr32 mozctlx dll If this does not work the directory containing regsvr32 exe...

Page 32: ...w browser Use DDE Select this if the browser uses Dynamic Data Exchange DDE for object linking and embedding Most browsers use Object Linking and Embedding OLE instead Location Click the file icon fin...

Page 33: ...igure External Browsers 2 In the External Browsers dialog box select one of the following options Prompt to save changes to the current document Asks you whether to save the current document before op...

Page 34: ...st The top pane displays all of your drives and SNE node servers In Windows Explorer Find the SNE node under My Computer and access the files under the SNE node in the same way as you access files in...

Page 35: ...s include Secure server access Remote file access Data source browsing and SQL query building CFML debugging You must have an RDS server connection to access data sources and to debug pages Required s...

Page 36: ...ete name for example ftp somesite com Initial Directory Top level directory for the account This is optional for accounts that default to the root directory of the FTP server but it is required if the...

Page 37: ...isable the Secure SSL feature in the Configure FTP Server dialog box before transferring these types of files To enable SSL for an FTP connection 1 On the Files resource tab in the top pane with Macro...

Page 38: ...o not see any FTP RDS node in the list select Options Settings File Settings FTP RDS Enable Explorer shell integration 2 In the list of servers in the top pane right click the top level node labeled M...

Page 39: ...delete server configurations To view and edit the configuration for a server 1 On the Files resource tab in the top pane with Macromedia FTP RDS selected in the drop down box right click the server an...

Page 40: ...is required such as for CFML JavaServer Pages JSP or other scripting languages the web server transfers the page to the appropriate server for further processing and then returns it to the browser Thi...

Page 41: ...lowing scenarios show how file mappings work when you have local or remote files matched with either local or remote servers HomeSite for Dreamweaver MX and ColdFusion on the same computer Debugging i...

Page 42: ...mapping for the App1 directory as in the following table Using UNC paths and the Network Neighborhood Developers can debug code against remote ColdFusion Servers across an internal network using UNC p...

Page 43: ...App1 directory as in the following table Adding a server mapping This section provides instructions for adding a server mapping in HomeSite for Dreamweaver MX and how to set a default mapping For more...

Page 44: ...ath are required 5 Click Add then click OK 6 Click Apply HomeSite for Dreamweaver MX saves the mapping You can now browse your documents in the internal or external browser To edit a mapping 1 In the...

Page 45: ...customizing the workspace to make your development work as productive as possible Contents The workspace areas 26 Working in the Resources window 28 Creating and browsing files in the Document window...

Page 46: ...pment menus Below the menus are toolbars that provide one click access to commands and application tools To the right is the QuickBar a tabbed toolbar for inserting JSP HTML and other web language ele...

Page 47: ...nd you can easily change settings for different tasks To set options 1 Select Options Settings F8 to open the dialog box 2 Click a feature category in the left pane to display options in the right pan...

Page 48: ...hen you add a data source it appears in the drop down list at the top Just select a data source to view its schema You can write and test database queries in the SQL Builder Projects Helps you manage...

Page 49: ...ny changes to a page that do not require processing by a server for example previewing formatting changes For information on configuring the internal browser see Configuring the internal browser on pa...

Page 50: ...e Results window The Results window displays the results of document operations in individual panels It opens automatically when you run an extended search Extended Find or Extended Replace Code Valid...

Page 51: ...he Visual Tools Markup Language VTML For more information see Customizing the Development Environment on page 197 You can extend or change the program s functionality by scripting the Visual Tools Obj...

Page 52: ...Reset to Defaults This also resets the default settings for which toolbars are shown or hidden It does not override any changes that you have made to toolbuttons 4 To move every floating toolbar and...

Page 53: ...ize dialog box click Close The toolbutton is added to the toolbar in the workspace To change the order of toolbuttons 1 Select Options Customize 2 In the Customize dialog box in the Visible Toolbars b...

Page 54: ...Close To add a custom toolbar 1 Select Options Customize 2 In the Customize dialog box to the right of the Visible Toolbars box click Add Toolbar 3 In the Add Toolbar dialog box enter a name for the t...

Page 55: ...Help tab in the Document window For more information see About the Help tab on page 29 Editing Help in tag editors and Tag Chooser Using the Visual Tools Markup Language VTML you can edit Help text in...

Page 56: ...r file path 5 Click OK The bookmark is added to the Help Bookmarks list 6 Click Close To open a bookmarked Help document On the Help tab toolbar click the down arrow next to the Bookmarks toolbutton a...

Page 57: ...ults After the initial indexing each time you open the Help tab the program checks the Help for changes If Help files have been added or deleted the program automatically indexes the Help files again...

Page 58: ...Help VeritySearchTips htm and use your browser s print command Extending the Help system Like the product the Help system is fully extensible You can add documents to the Help system by dragging and d...

Page 59: ...ree For most users this is all you need to do If however you want to control the order in which the Help references appear you can edit the booktree xml file in the Help root directory The structure o...

Page 60: ...e booktree xml file 3 Find the help_page tag for the text file and add a title attribute for the text file for example help_page title My Readme Adding media content You have considerable flexibility...

Page 61: ...and DBCS Double Byte Character Set files The tasks described in this chapter do not replace the need for creating a project to organize the files in a website or web application For instructions on ho...

Page 62: ...cal and network drives and Macromedia FTP RDS You can use the standard copy move and paste commands between tabs If you undock one or both of the tabs you can drag files and folders between them To mo...

Page 63: ...ou work with non ANSI encoded documents you can open encoded files and save files with character encoding The following encoding formats are supported ANSI Current system code page Unicode Unicode Big...

Page 64: ...reamweaver MX 2 Under Startup select what you want to open 3 Under Startup folder select the folder you want to display in the Files tab 4 Click Apply Opening a file Use the following procedures to op...

Page 65: ...ag a file or image to the Editor to the desired cursor position on the page Note Alternatively you can right click a file and select Insert as Link The link is inserted in the current page at the curs...

Page 66: ...amweaver MX saves the file with the encoding that you specified Backing up files This section describes the Auto Backup feature and how to use it Auto Backup operates much like the backup systems in m...

Page 67: ...tory or select a different one 3 Optional For Auto Backup on Save set the following options Use the backup directory for local and network files or save the backup with the original file Note that the...

Page 68: ...ed directory 2 To refresh the file list display press F5 To change the information listed for each file 1 Right click in the file list and select View 2 From the View submenu show or hide the document...

Page 69: ...You can download any HTML page and open it in the Editor Note These files cannot be saved back to the server To open a page from a website 1 Select File Open from Web 2 Enter the URL for the page or s...

Page 70: ...50 Chapter 4 Managing Files...

Page 71: ...ying complex dynamic sites This chapter describes basic techniques for creating web content and application code Contents Inserting code 52 Using inline tools to enter code 55 Using code generating to...

Page 72: ...s code directly into the document or for tags that require attributes opens a tag editor In addition to toolbars for product tools and standard Windows commands you can display toolbars for HTML CFML...

Page 73: ...at are inserted directly into a document are listed with brackets in the right pane such as HTML HTML All other tags have individual editors that open when the tag is selected 5 If a tag editor opens...

Page 74: ...an existing tag for example in the body tag To complete the details for a tag 1 In the Editor position the cursor in the tag to complete 2 Right click and select Edit Current Tag from the pop up menu...

Page 75: ...p down list Click the item in the list and click Delete The item is immediately deleted from the list 5 Click Apply To view a Tag Tip 1 Position the cursor inside a tag and press F2 to see the attribu...

Page 76: ...ng the Development Environment on page 197 4 Click Apply To insert arguments using Function Insight 1 Enter a function name followed by a left parenthesis to display a drop down list of recognized arg...

Page 77: ...o define a code template 1 Open Options Settings Editor Code Templates 2 In the Code Templates pane click Add 3 In the Add Code Template dialog box enter a keyword a description of the code template a...

Page 78: ...The Wizards for Deployment Scripts and Initial Configuration are in the Custom tab Expression Builder provides an expandable tree of all supported expression elements including functions constants op...

Page 79: ...inks For other supported languages such as WML and SMIL use the appropriate link syntax To insert a file into a document 1 Select File Insert File 2 Open the drop down Files of type list to filter fil...

Page 80: ...h to a different external browser click the View External Browser List toolbutton on the View toolbar and select a browser from the list To add content in a visual WYSIWYG editor 1 Select View Open in...

Page 81: ...lect Browse 2 Use the browser s print command to print the document To assign a key combination 1 In the Options Customize Keyboard Shortcuts tab select a command from the list 2 Click in the text box...

Page 82: ...name for the snippet in the Description box Note that snippet names cannot contain characters that are illegal in filenames such as slashes special characters or double quotes 5 In the Start Text win...

Page 83: ...on another network computer Shared folders icons are blue and shared snippets icons have blue angle brackets on them To create a shared snippets folder 1 Open Options Settings Locations 2 In the Shar...

Page 84: ...variables DATE MONTH TIME DATETIME DAYOFWEEK CURRENTFILE Current file name just the file CURRENTFOLDER Current folder just the folder CURRENTPATH Current path full file name USERNAME Current user MON...

Page 85: ...steps such as providing a text alternative for images graphics and animations and using descriptive text for page elements and navigation can make a world of difference to a visually impaired user s...

Page 86: ...se the arrow keys to scroll the list 5 To open the list in the external browser press Shift F10 to open the context menu then select the Browse command You can change any of the current key combinatio...

Page 87: ...owing list describes some ways to work productively in the user interface You can use Windows Explorer instead of the Files tabs for working with the file system network drives and remote servers Tag...

Page 88: ...68 Chapter 5 Writing Code and Web Content...

Page 89: ...ese tools to your best advantage Contents Setting editor options 70 Selecting a code or text block 71 Saving text to the multiple entry Clipboard 71 Collapsing text 72 Editing a referenced file 73 Usi...

Page 90: ...lets you close a block of selected text while editing other parts of a document Auto Completion saves typing by completing the string when a trigger string is entered Tag Insight gives you pop up acce...

Page 91: ...access the following toolbuttons on the Edit toolbar Show Clipboard Displays a drop down window of copied items You can position the mouse over an item to display a tooltip of the item s contents Clic...

Page 92: ...ollapsed text can fit on the marker Enable a tooltip to display the text when you position the mouse over a collapsed text marker and set the maximum number of lines to display Enable the automatic se...

Page 93: ...out the Files tabs on page 42 The Results window displays thumbnails for the images in the current folder To edit an image 1 Select the image to edit by doing one of the following Right click an image...

Page 94: ...ting or click Yes to browse for and open the source PNG file Fireworks MX opens 3 Optional Edit the image 4 Save your changes and close Fireworks MX Editing an included file You can edit included file...

Page 95: ...same except the VTML tag editors support multiple languages browsers event code and coding preferences The VTML Anchor tag editor supports multiple protocols and accessibility options unlike the stand...

Page 96: ...ag Tree toolbar click Refresh 5 To display the contents of the selected tag in a single node on the Tag Tree in the Tag Tree toolbar click Collapse document based on outline About outline profiles Out...

Page 97: ...epeat the previous step until you are satisfied with the list of recognized tags for the selected outline profile 6 To customize a tag select a tag in the list and complete the Tag Settings frame Capt...

Page 98: ...ar to the property sheets in Visual Basic and Delphi Tag Inspector fully supports ColdFusion Server You can also edit tag definitions from Tag Inspector for example to change the valid attributes for...

Page 99: ...s list 3 In the drop down list select a script language for the event handler for example select Create JavaScript Event 4 In the Specify Event Handler Name dialog box select the default entry or ente...

Page 100: ...contains the attribute class class name for example p class note This means that you can define an unlimited number of styles for a single page element For example you can define classes for a paragra...

Page 101: ...ax If you edit styles manually you must adhere to their syntax requirements The following are the basic coding requirements for styles Properties and their values must be inside curly braces Each prop...

Page 102: ...ges The following figure shows the main components of the TopStyle user interface The TopStyle online Help includes a tutorial a CSS reference procedures for using its features and information for upg...

Page 103: ...you start Macro Recorder they turn off automatically while you record a macro and turn on after you stop recording the macro Resource Windows are not supported in the Macro Recorder Use menu options o...

Page 104: ...Play button To edit a macro 1 Select Tools Macro Manager 2 In the Macro Manager dialog box select a saved macro and select the Edit button The macro file opens in HomeSite so you can edit it You can a...

Page 105: ...t cmdCursorDown cmdCursorUp cmdCursorPageDown cmdCursorPageUp cmdCursorDocStart cmdCursorDocEnd cmdCursorLineStart cmdCursorLineEnd cmdCursorWindowTop cmdCursorWindowBottom cmdDebugBreakpoints cmdDebu...

Page 106: ...leteToEOL cmdEditDeleteWordLeft cmdEditDeleteWordRight cmdEditSelectAll cmdEditConvertTagCase cmdEditGotoLine cmdEditGotoPreviousStartTag cmdEditGotoNextStartTag cmdEditGotoPreviousEndTag cmdEditGotoN...

Page 107: ...EditorLast cmdEditorNext cmdEditorPrev cmdEditorFileClose cmdEditorToggleGutterLineNum cmdFileOpen cmdFileClose cmdFileCloseAll cmdFileNew cmdFileNewWizard cmdFileSave cmdFileSaveAs cmdFileSaveAsTempl...

Page 108: ...AddFile cmdProjectRemoveFile cmdProjectSync cmdProjectUpload cmdProjectOpenWarFile cmdServletProject cmdSaveAsWarProject cmdProjectCompileActiveDoc cmdProjectCompileAll cmdProjectExportAsWar cmdProjec...

Page 109: ...mdSelectionConvertToTable cmdSelectionAddBR cmdSelectionStripTags cmdSelectionUCase cmdSelectionLCase cmdSeparator cmdStartJrunServer cmdStopJRunServer cmdSurroundWithPounds cmdToolsTagChooser cmdTool...

Page 110: ...mdViewTagTip cmdViewToggleEditPreview cmdViewToggleTagInspectorFocus cmdViewToggleSpecialChar cmdViewToggleQuickBar cmdViewDockLocalFiles cmdViewDockRemoteFiles cmdViewDockDatabase cmdViewDockProjects...

Page 111: ...ForEach jrunIf jrunSwitch jrunCase jspPage jspIncludeFile jspTagLib jspDeclaration jspScriptlet jspExpression jspUseBean jspSetProperty jspGetProperty jspInclude jspForward jspParams jspParam jspPlugi...

Page 112: ...s tagFontSize_Minus tagForm tagFrameDlg tagFrame tagFrameWizard tagFrameset tagFramesetDlg tagH1 tagH2 tagH3 tagH4 tagH5 tagH6 tagHidden tagHR tagIFrameDlg tagIFrame tagIMG tagItalic tagLI tagMap tagM...

Page 113: ...agTableWizard tagTD tagTDDlg tagText tagTextarea tagTH tagTHDlg tagTR tagTRDlg tagUL tagJScriptTree tagScript tagNoScript tagParam tagDocWrite tagUnderline tagStart tagEnd tagASP_Else tagASP_End tagAS...

Page 114: ...tagCFLocation tagCFLoop tagCFMail tagCFOutput tagCFParam tagCFPOP tagCFQuery tagCFReport tagCFSearch tagCFServerVar tagCFSet tagCFTable tagCFCookie tagCFForm tagCFApplet tagCFSubmit tagCFText tagCFHi...

Page 115: ...ctory tagCFTry tagCFCatch tagCFThrow tagCFLock tagCFCase tagCFDefaultCase tagCFSwitch tagCFScript tagCFBreak tagCFExit tagCFUpdate tagNoFramesDlg tagCFChart tagCFChartData tagCFChartSeries tagCFGraphB...

Page 116: ...96 Chapter 6 Editing Pages...

Page 117: ...dating against different language specifications and working with tag definitions For information about building SQL statements see Using SQL Builder for database queries on page 132 Contents About la...

Page 118: ...support Coding tools controls options wizards color coding schemes CodeSweepers and validation support are also available for many other languages including ActiveServer Pages ASP ActiveX ActiveScript...

Page 119: ...the Options Settings Markup Languages pane 2 Select the options you need as described in the following table Option Result when selected Lowercase all inserted tags Tag editors and the Tag Inspector...

Page 120: ...height 20 Option Result when selected Minimize empty tags for example br If the current document is set or recognized to be an XHTML document the toolbuttons on the QuickBar for empty tags insert min...

Page 121: ...pecification reformat your code using a CodeSweeper or HTML Tidy and validate against the XHTML 1 0 specification You can also use the W3C XHTML validator sites for http validator w3 org web based fil...

Page 122: ...TML documents can use applications such as scripts and applets that rely on the HTML Document Object Model or the XML Document Object Model It requires quality code This reduces the discrepancies betw...

Page 123: ...br instead of br 5 If when you select Options Set Document as XHTML you want to be able to choose between inserting the doctype declaration for the XHTML Strict Frameset or Transitional DTD or not ins...

Page 124: ...this if you do not want to change or add a doctype declaration for example if you are writing XHTML code to include in another page that already has its own doctype declaration Always replace with thi...

Page 125: ...the XHTML 1 0 specification and describes what the XHTML validator checks For more information about the validator see Validating code on page 120 Configuring the validator for XHTML Following is one...

Page 126: ...wercase Document must have an XHTML doctype declaration The document must have tags for html head and body The title attribute must be in the head element Elements must nest symmetrically for example...

Page 127: ...is matched but what is not matched for example there might be two or more strings that you must replace with the same text Also it is always a good idea to back up your files first In a search and re...

Page 128: ...one character RegExp that match a single character Special characters are Any character that is not a special character matches itself Use the keyboard Tab Enter to match whitespace characters The as...

Page 129: ...haracters with character sets for example Nn Ii Cc Kk Using a character class You can specify a character by using a POSIX character class You enclose the character class name inside two square bracke...

Page 130: ...less of case The OR character allows a choice between two regular expressions For example jell y ies matches either jelly or jellies Braces are used to indicate a range of occurrences of a regular exp...

Page 131: ...s what they match Expression Description value A URL parameter value in a URL A Z A Z0 9_ An uppercase DOS Windows full path that is not the root of a drive and that has only letters numbers and under...

Page 132: ...Structured Query Language SQL Text VisualBasic Script VBScript Visual Tools Markup Language VTML To change the color coding scheme to use in your documents 1 In the Options Settings Editor Color Codin...

Page 133: ...pane shows the options that are set for the selected scheme 4 Select an item from the Elements list 5 To change either the foreground or background color for the element first clear the Use default o...

Page 134: ...at they are XHTML compliant see Using CodeSweepers to convert your code to XHTML on page 105 About HTML Tidy HTML Tidy is an independent open source code utility for verifying and formatting HTML code...

Page 135: ...nsions Codesweepers directory 2 Save a backup copy of the file 3 Add edit and delete the name value pairs as needed 4 Save the file The HTML Tidy CodeSweeper pane displays the updated information Dele...

Page 136: ...deSweeper type box select Macromedia CodeSweeper or HTML Tidy CodeSweeper and click OK 3 Select the node for the new HTML Tidy CodeSweeper under Macromedia CodeSweepers or HTML Tidy Codesweepers and c...

Page 137: ...k Apply To edit an HTML Tidy CodeSweeper see Editing an HTML Tidy CodeSweeper on page 115 To delete a Macromedia CodeSweeper 1 In the Options Settings CodeSweeper pane select the CodeSweeper and click...

Page 138: ...ase All Lower Case Forces every name to lowercase Format attribute names Format event names Formats event names in the same ways as described for tag and attribute names with one additional option Mix...

Page 139: ...start tag before the end tag and or after the end tag Indent by Indents the tag the number of spaces or tabs that you specify Indent other sub tags from this tag Indents any tags that are nested insid...

Page 140: ...n the Add Tag Specific Settings dialog box enter the tag name and click OK 4 Specify the formatting rules for the tag and click Update Tag For more information see About the tag specific settings on p...

Page 141: ...ppear in the Results window after validating a document specify a maximum number of errors to report In the Other section select options as needed for example to check the code for mismatched quotes a...

Page 142: ...he tag s Required folder and click Add 6 In the Required Attribute dialog box enter the name of an existing attribute and click OK If the attribute is not in the Attribute folder add it to the Attribu...

Page 143: ...ts of the specific tag for example it does not check if a tag has an end tag or if the tag is in the wrong place in the document Note If you validate both CFML and HTML in a single document the valida...

Page 144: ...ages and contains other useful features For more information open the Options Settings Validation pane and click the CSE HTML Validator link to visit their website To use the CSE HTML Validator 1 In t...

Page 145: ...ag Definitions Library pane represents the order in which HomeSite for Dreamweaver MX searches the directories when looking for a tag definition For example if you enter region in a document right cli...

Page 146: ...tag editors For more information about creating or modifying tag editors see Creating a tag definition file on page 202 To edit a tag definition using a VTML tag editor 1 Open the VTM file from the a...

Page 147: ...n file Use the skeleton tag definition file Extensions TagDefs TagDefTemplate vtm as a starting point for creating your own tag Create a tag definition from Tag Inspector In this case the new tag does...

Page 148: ...128 Chapter 7 Using Web Development Languages...

Page 149: ...scribes how to use the visual tools in HomeSite for Dreamweaver MX to accelerate development of data driven ColdFusion applications Contents Introduction to database tools 130 Working with data source...

Page 150: ...tive database drivers are installed with the Enterprise version OLE DB drivers are installed with the Professional and Enterprise versions To add a data source to ColdFusion Server 1 In the ColdFusion...

Page 151: ...e a few moments 3 Expand the data source tree To expand the tree click the plus sign next to a data source name To view the database schema click the plus sign next to Tables To view the column defini...

Page 152: ...t it into a cfquery tag You can also use SQL Builder to test your queries To open SQL Builder do one of the following In the Database tab right click a database name or a table and select New Query Se...

Page 153: ...s to update SQL pane Displays the SQL statement as it is being constructed The SQL pane does not support reverse editing so any changes that you make in this pane are not made in the Properties pane o...

Page 154: ...ter join right click the join and select the appropriate command 4 Drag the columns to display onto the Column section of the Properties pane 5 Optional Set additional query attributes in the Properti...

Page 155: ...er To insert just the SQL statement from SQL Builder click Copy SQL to Clipboard and close SQL Builder HomeSite for Dreamweaver MX prompts you to save the query Then you can paste the statement into y...

Page 156: ...Dreamweaver MX prompts you to enter values for the variables in the query If you save a query you can edit it later However pages containing the query are not automatically updated To make the change...

Page 157: ...his chapter describes how to use a HomeSite for Dreamweaver MX project to manage the files in a website Contents Understanding projects 138 Creating a project 140 Working with a project 144 Adding a p...

Page 158: ...e of the benefits of using projects A project lets you access every file in your website from one central location the Projects resource tab even if the physical files are located in different local n...

Page 159: ...project folders on page 138 Folder type Icon Description Use to Virtual Container for files that have no logical relationship to each other You can put any collection of files in a virtual folder You...

Page 160: ...s limited to the number that you specify here Default project folder type By default when you add a folder to a project it is of the type Manual include or Auto include For more information see About...

Page 161: ...select a list of file types from the drop down list If you do not see the list of file types that you need enter the file extensions for the file types to include separated by a semicolon for example...

Page 162: ...specify the path of the folder 4 Optional In the Folder Name box modify the name 5 Click OK 6 In the Populate New Folder dialog box select any of the following options All files in the selected direct...

Page 163: ...Folder Properties dialog box change the information For more information see Setting project options on page 140 3 Click OK To remove a folder 1 On the Projects resource tab right click a folder and s...

Page 164: ...Files Using Filter drop down box do one of the following Select All files Select a list of file types Enter a list of file types separated by semi colons for example htm html css png gif jpg jpeg 3 Cl...

Page 165: ...ext based file in the project or folder displays in the Editor with a tab for each file For files that are not text based you might be asked to clear an option To edit properties within a project 1 On...

Page 166: ...xts key These excluded files are large binary files such as EXE PDF ZIP and media file types To view resources 1 In the top pane of the Projects tab expand the Resources node 2 Click a resource type T...

Page 167: ...semicolons for example gif jpg jpeg png 4 Click OK To edit a resource in a project 1 On the Projects resource tab in the project folder pane right click the resource and select Properties 2 In the Edi...

Page 168: ...e Code Control SCC API to connect to standard source control applications The SCC API works with client based and server based systems HomeSite for Dreamweaver MX automatically generates a list of sou...

Page 169: ...e information see the VSS documentation 2 Select File Set Working Folder and set the working folder to be the root folder for your HomeSite for Dreamweaver MX project 3 In HomeSite for Dreamweaver MX...

Page 170: ...d add to source control The toolbar commands are applied to the current document in the Document window You can also access the toolbar commands by right clicking in the Projects pane Note You cannot...

Page 171: ...e debugger runs against dynamic pages on the ColdFusion Server You can set breakpoints and step through the code to isolate and correct problems A tabbed debug window provides breakpoints variables re...

Page 172: ...opment Services RDS is enabled and a server mapping is defined Debugging is not supported on Windows 98 The debugger lets you perform these tasks Set breakpoints and watches Evaluate variables and exp...

Page 173: ...servers on page 14 To set up a debugging session 1 In the Options Settings File Settings FTP RDS pane select the Enable Explorer shell integration option if it is not already selected 2 Open an appli...

Page 174: ...ia RDS Security box if RDS Security is implemented on your system enter a username and password to access the server If you do not have this information ask your network administrator Optional Select...

Page 175: ...g ColdFusion Server If you debug against a local server enter the same path as for HomeSite for Dreamweaver MX If you debug against a remote server enter its absolute path The path must be the same as...

Page 176: ...ug Start pane the next time you click Run Debug breakpoint lines are shaded red To turn breakpoints on and off select Debug Toggle Breakpoints To delete all breakpoints in the current document select...

Page 177: ...session click End The debugger remains active until you select Debug End About the Debug window To open the Debug window select View Debug Window These are the panes in the Debug window Each pane has...

Page 178: ...ssion and setting a watch To evaluate an arbitrary expression when the debugger is suspended at a breakpoint you use the evaluator box at the top of the Watches pane in the Debug window Use the evalua...

Page 179: ...specify a deployment path for the entire project or for individual folders and files This chapter describes how to set default deployment options and how to deploy files to a server Contents Setting d...

Page 180: ...directory structure on the client If this is not selected and you add a new directory to the client then when you try to deploy you will receive an error Upload Only Newer Compares the files on the c...

Page 181: ...o Not Show this Dialog Again if you do not want a confirmation to appear for future deployments 5 Click Deploy To deploy to multiple servers 1 On the Projects resource tab open a project For more info...

Page 182: ...roject or select specific files to deploy Setting project level deployment To set the deployment for a project enter an absolute path for the location Note The Relative to the Parent Folder Deployment...

Page 183: ...ocal and network drives for example C Directory Subdirectory or Directory Subdirectory Use forward slashes for pathnames to remote servers Use drive letters for RDS servers for example C Directory Sub...

Page 184: ...RDS Server 3 Complete the server configuration dialog box Configure FTP Server or Configure RDS Server For instructions see Working with files on remote servers on page 14 4 Click OK to save the serv...

Page 185: ...lect Remove Server from the popup menu 3 Click Yes to confirm that you want to remove the server Running the Deployment Wizard You can use the Deployment Wizard to accomplish the following tasks Deplo...

Page 186: ...with the project Click Next 5 Click Finish The Results window Deployment tab opens and shows the progress of the file transfer When deployment is complete the Results window also displays the status...

Page 187: ...ard window appears 3 Select Scriptable Deployment and click Next 4 In the Deployment Task Name box enter a name for the script 5 In the Script Language box select VBScript or JScript 6 In the Save Scr...

Page 188: ...elect Run Script The Results pane opens and displays the status of your deployment To view a deployment script s properties 1 On the Projects resource tab in the top pane expand the Deployment Scripts...

Page 189: ...log file 1 Open the Options Settings Projects Deployment pane 2 In the Logging box clear Disable Logging 3 Optional In the Log File box specify a new location for the log file By default results are w...

Page 190: ...170 Chapter 11 Deploying Files...

Page 191: ...racy completeness and efficiency HomeSite for Dreamweaver MX provides a full set of tools to accomplish these necessary tasks Contents Working in the Results window 172 Searching documents 174 Checkin...

Page 192: ...ults window The Results window displays output from these operations Extended Find or Extended Replace Validate code Verify links Display image thumbnails Deploy a project The Results window displays...

Page 193: ...he appropriate tab even when you move from one tab to another or close the Results window However results are discarded when you repeat the same operation or close HomeSite for Dreamweaver MX For exam...

Page 194: ...lace text within a selection you can select the Selection option in the Replace dialog box Optionally you can configure HomeSite for Dreamweaver MX so that when you do not select any search text it se...

Page 195: ...on the current document For instructions see Performing an extended search on page 176 4 Click Find Next to sequentially highlight each match in the document 5 If the search dialog box closes you can...

Page 196: ...e current document only using more advanced options than are available in a basic search All open documents searches all open documents even those that are not yet saved In folder searches the documen...

Page 197: ...project Caution An extended replace operation cannot be undone For best results select the Make backups option Also an extended replace operation skips all read only files To perform an extended repl...

Page 198: ...ns in the Windows Registry LinkVerifyExcludeExts key Display Line Info Displays the contents of the line in which the match was found This slows down the performance in large searches Make backups Sel...

Page 199: ...results pane and select Open in Browser This opens the search results list in the default external browser You can print the list from the browser To clear the search results Right click in the search...

Page 200: ...select Regular expressions Enabling Regular expressions disables the Skip tags while searching option 3 If replacing text in a project or folder select Make Backups and specify a backup location If r...

Page 201: ...pelling pane 3 In the User Dictionary box accept the default entry or specify an alternate location and text file to supplement the main dictionaries For more information see About the user dictionary...

Page 202: ...d or another Microsoft Office application 2 In the Options Settings Spelling pane in the User Dictionary box enter or browse to the absolute path of the Custom dic file 3 Click Apply To modify the use...

Page 203: ...HomeSite Perform OEM conversion Translates Windows ANSI characters to the currently installed OEM character set Correctly identifies Chinese characters on a Windows computer that uses a Chinese keyboa...

Page 204: ...sspellings in the current document select Tools Mark Spelling Errors This marks misspellings in the document as it is when you select this command This does not mark misspellings as you type To correc...

Page 205: ...ExcludeExts key To set options for link verification do any of the following To change the URL or local directory that HomeSite for Dreamweaver MX should use to process the relative link select a link...

Page 206: ...onal Set a timeout value for the processing of each link 4 Click OK to run the verification routine 5 To end the link validation before it completes click Stop To verify a single link In the Results w...

Page 207: ...n the current document 1 Click the link in Site View to highlight it in the document 2 Edit the link text as necessary 3 To update Site View right click in the Site View pane and select Refresh To vie...

Page 208: ...e of modem speeds Only image files GIF JPG PNG are tested and included in the Dependencies list The following graphic shows a sample Document Weight list To test the current document s download time 1...

Page 209: ...t URL for an FTP server 1 In the Resources window click a Files tab 2 In the Drive List select Macromedia FTP RDS 3 Right click a server name and select Properties 4 In the Configure FTP Server dialog...

Page 210: ...190 Chapter 12 Testing and Maintaining Web Pages...

Page 211: ...ou can add documents to the Help system by dragging and dropping them into the Help folder either from the Files tab or Windows Explorer Contents Introduction 192 Adding content to the Help tree 193 C...

Page 212: ...ate a link from within an HTML file to files with TXT DTD and PDF extensions if you use Internet Explorer as the internal browser You can view web graphics files GIF JPG PNG in Help files This extensi...

Page 213: ...hted name box appears 3 Enter a name for the folder in the box and press Enter 4 If necessary press F5 to refresh the Help display The new folder appears at the bottom of the Help tree To add document...

Page 214: ...content as well as to add custom folders and files to a specific location in the Help tree Alternatively you can use the path attribute in the book and chapter tags to specify the folder s location o...

Page 215: ...the filename as the document s title in the Help tree To change an HTML file s title in the Help tree Edit the HTML file to include its new name in the title tag To change a text file s title in the...

Page 216: ...196 Chapter 13 Extending the Help System...

Page 217: ...orted language elements WIZML enables you to design and build custom wizards to gather user input and to drive application output See the VTML Help Reference for the full syntax and descriptions of bo...

Page 218: ...evelopers use VTML to build tag editors to distribute with their tags libraries You can find a selection of custom dialogs and tag editors in the VTML section of the Visual Tools Developer Exchange at...

Page 219: ...of VTML files which can be identified by opening the Extensions MarkUpTag vtm files Expression Builder displays a hierarchical view of all supported expression elements and fully supports ColdFusion 5...

Page 220: ...le In previous releases the MarkUpTags file was a repository of VTML coded information for all the supported languages It was a large complex document This release takes a more modular approach to VTM...

Page 221: ...cat sub category No 2 e e cat cat Category tag The cat tag defines a category in the Category tree The Category tree populates the left pane of Tag Chooser and Expression Builder For syntax and usage...

Page 222: ...in language directories to prevent possible name conflicts between various markup languages Whenever you make changes to a VTM file or create a new one save the file then press Ctrl Alt Shift C to app...

Page 223: ...names of the attributes You can use the attrib tag to define the following attributes Attribute value types Enumerated values for the align attribute The optional caption attribute specifies the form...

Page 224: ...type TextBox anchor lblCode corner NE width 30 container editorlayout tag You can name the above template mytag vtm and test it by attempting to edit an empty mytag tag The example displays a single P...

Page 225: ...tag editor dialog boxes where a single attribute value might have to be filled into multiple controls Special attrib tag variable names The following special variables can be used TAGBODY This specia...

Page 226: ...er selects White in the colorBGColor ColorPicker control the template generates this tag mytag color White Special variables In addition to the control variables a few other parameters get sent to the...

Page 227: ...ace Arial SIZE 10 NONLINEAR mytag color White face Arial size 10 Using TAGDATAUnknownAttributes The TagDataUnknownAttributes tag contains the list of attributes that are contained in the original tag...

Page 228: ...bled Cfapplication is typically used in the application cfm file to set defaults for a specific ColdFusion application tagdescription As the Help content grows it might become cumbersome to specify th...

Page 229: ...caption TEXTAREA Tag embedded controls container container name TabPage2 type TabPage caption Content embedded controls container container See VTML_Reference container html tabpagetabpage a in the V...

Page 230: ...down 17 right 10 width 50 control name txtSource type TextBox value Some Value anchor lblSource corner NE width maximum See VTML_Reference control html labellabel a in the VTML Reference for syntax an...

Page 231: ...e VTML_Reference control html colorpickercolorpicker a in the VTML Reference for syntax and usage information Checkbox control name checkNoShading type CheckBox caption No Shading anchor numWidth corn...

Page 232: ...ner NE width 130 control name txtDataSource type TextBox anchor lblDataSource corner NE width 130 control name lblMaxRows type Label caption Max Rows anchor txtQueryName corner NE down 0 right 10 widt...

Page 233: ...tax and usage information Image control name imgApplet type Image filepath Images Applet bmp down 10 right 10 autosize Yes See VTML_Reference control html imageimage a in the VTML Reference for syntax...

Page 234: ...you have worked with VTML to create or edit tag dialog boxes you are familiar with building user interface containers and controls and with defining page layout You can use these skills to add wizards...

Page 235: ...e was set you would use the following syntax PARAM name RowsPerPage value 10 REQUIRED ParameterExists Customize Or to customize the OUTPUTFILE attribute of the TEMPLATE tag using a name attribute ente...

Page 236: ...width maximum down 5 item caption HTML 2 0 value HTML 2 0 item caption HTML 3 2 value HTML 3 2 item caption HTML 4 0 value HTML 4 0 control control name lblTitle type label anchor lblDocType corner S...

Page 237: ...GE name MetaKeywords type DYNAMIC caption Meta Keywords IMAGE images main bmp PAGELAYOUT control name chkMetaKeywords type CheckBox caption Add meta keywords down 15 right 10 width maximum control nam...

Page 238: ...m and URL parameters Parameters can be output directly or can be used to customize the type of output generated The values of these wizard parameters can originate from several locations From a value...

Page 239: ...another wizard output template WIZLOOP Iterates over a set of outputs WIZBREAK WIZCONTINUE Assists in loop flow control WIZIF WIZELSEIF WIZELSE Sets conditional flow control Special considerations Str...

Page 240: ...tionName required yes validationMsg You cannot leave the Application Name field blank INPUT name editLocation param Location required yes validationMsg You cannot leave the Location field blank PAGE S...

Page 241: ...s value SearchFields ResultFields DetailFields UniqueIdentifier INPUT name lstTables param Tables required yes validationMsg You did not select any tables Please select at least one before proceeding...

Page 242: ...ds Please select at east one before proceeding PAGE SelectField PAGE name IDField type SelectField caption Unique Identifier image images UniqueIDDetail bmp PARAM name DataSource value DataSource PARA...

Page 243: ...r describes how to write and execute scripts in HomeSite for Dreamweaver MX It also provides the syntax and examples of the objects in HomeSite for Dreamweaver MX Contents Writing and executing script...

Page 244: ...g an external Windows ws script check if your anti virus software is blocking its execution Anti virus software should not affect JScript or VBScript scripts that are run from within HomeSite for Drea...

Page 245: ...e 2 maximize the window The following code creates an Application object variable in VBScript Sub Main Dim app set app Application create application object variable app WindowState 2 maximize the win...

Page 246: ...the tab 2 Click Add Custom Button 3 In the Custom Toolbutton dialog box select the Execute an ActiveScript file option 4 Enter a path and filename in the Script File box 5 Make selections in the Butt...

Page 247: ...tionType integer read only Description The current application type Sample ApplicationType script Tests Application ApplicationType property 0 HomeSite 1 CF Studio 2 JRun Studio function Main var iApp...

Page 248: ...path in a variable CurrentFolder Syntax CurrentFolder OleString Description Path currently displayed in the local file list Example function Main with Application CurrentFolder C InetPub wwwroot Curr...

Page 249: ...rentView 2 sMessage You are now in Browse View of your VersionText MessageBox sMessage VersionText 0 CurrentView 3 sMessage You are now in Help View of your VersionText MessageBox sMessage VersionText...

Page 250: ...ndex of the current document DocumentIndex Syntax DocumentIndex Integer Description Tab index of current document Example function Main Var sMessage with Application sMessage There are sMessage sMessa...

Page 251: ...ents n sMessage sMessage Width Width n Get Width sMessage sMessage Height Height n Get Height HInstance Syntax HInstance integer read only Description Instance handle of the application hWnd Syntax hW...

Page 252: ...n sMessage sMessage Width Width n Get Width sMessage sMessage Height Height n Get Height ResourceTabShowing Syntax ResourceTabShowing WordBool Description Boolean Specifies whether the resource tab di...

Page 253: ...eft sMessage sMessage And the following measurements n sMessage sMessage Width Width n Get Width sMessage sMessage Height Height n Get Height VersionText Syntax VersionText OleString read only Descrip...

Page 254: ...te integer Description Set and get window state The following values are allowed 0 Normal 1 Minimized 2 Maximized Example function Main var iNormal 0 var iMinimized 1 var iMaximized 2 with Application...

Page 255: ...on Closes all open documents If wbPromptToSave is True the user is prompted to save any changes Returns True if successful that is the user didn t cancel if wbPromptToSave is True Example function Mai...

Page 256: ...tax ExtractFilePath const wsFile WideString WideString Description Returns the path of the passed file includes trailing Example function Main Var sFilePath Var sFullFilePath sFullFilePath C Temp MySc...

Page 257: ...nction Main with Application aFileObj new ActiveXObject Scripting FileSystemObject aFolder aFileObj GetFolder CurrentFolder aFiles new Enumerator aFolder files sExtToTest gif sFile for aFiles atEnd aF...

Page 258: ...er Description Returns the width in pixels of the passed image Returns 0 on error Example See the GetImageHeight example GetMemoryStatus Syntax GetMemoryStatus iMemType Description Returns an integer...

Page 259: ...r sRelativePath Var sFullPath2 sFullPath1 http www macromedia com sFullPath2 http www macromedia com software with Application sRelativePath GetRelativePath sFullPath1 sFullPath12 GetTabIndexForFile S...

Page 260: ...ing Description Retrieves a URL and returns its contents Example Tests GetURLResponse GetURLStatusCode function Main with Application sURL_1 http www macromedia com sURL_2 http www this_should_not_exi...

Page 261: ...with Application HideProgress Hides the progress bar HTMLConvertTagCase Syntax HTMLConvertTagCase const wsHTML WideString const wbUpperCase WordBool WideString Description Boolean Converts the case o...

Page 262: ...e tag sWidth HTMLGetAttribute table width 100 width HTMLGetTitle Syntax HTMLGetTitle const wsFile WideString WideString Description Returns the contents of an HTML file s title tag This only operates...

Page 263: ...signed to the new one The parser script is copied from the passed location to the application Parsers subdirectory Example function Main with Application InstallParserScript D Download XHTML_2 scc xht...

Page 264: ...Start MessageBox Syntax MessageBox const wsText wsCaption WideString nType Integer Integer Description Displays a message dialog box for obtaining a user response The nType parameter determines the ty...

Page 265: ...wDocument true NextDoc Syntax NextDoc Description Moves to the next document in the Document tab If the last document is showing wraps to the first Example function Main Var sMessage sMessage Hello wo...

Page 266: ...e MessageBox File does not exist or already open VersionText PreviousDoc Syntax PreviousDoc Description Moves to the previous document in the Document tab If the first document is showing wraps to the...

Page 267: ...All WordBool Description Boolean Saves all open documents Returns True if successful Example function Main with Application SaveAll SaveResultsToFile Syntax SaveResultsToFile const wsFile WideString D...

Page 268: ...tsType Description Boolean Sets the active page in the Results tab The following values are allowed resSearch resValidator resLinks resThumbnails Example function Main with Application SetActiveResult...

Page 269: ...unction Main with Application SetProgress 15 SetStatusText Syntax SetStatusText sMessage OleString Description Sets the text that displays in the status area Example function Main with Application Set...

Page 270: ...and then reload it ShellToAppAndWait notepad exe ActiveDocument Filename ActiveDocument Reload false ShowProgress Syntax ShowProgress Description Shows the progress bar Example function Main with Appl...

Page 271: ...nly StatusWarning Current document is read only TagCase Syntax TagCase const wsTag WideString WideString Description Changes the case of the passed string based on the Lowercase all inserted tags sett...

Page 272: ...e name of the toolbar displays in the title bar caption when the toolbar is not docked Toolbars are loaded from files in the toolbar directory which can be obtained from the ToolbarDir property The to...

Page 273: ...wsHint wsCaption wsImageFile WideString WordBool Description Boolean Adds a tag toolbutton inserts tag pair when clicked to the passed toolbar Fails if toolbar does not exist Returns True if a toolbu...

Page 274: ...sToolBarName DeleteToolbar Syntax DeleteToolbar wsToolbarName WideString WordBool Description Boolean Physically deletes the toolbar Fails if the toolbar does not exist or if the toolbar is one of the...

Page 275: ...olbarName WideString WordBool Description Boolean Displays a toolbar if it is not already showing Fails if the toolbar does not exist Example function Main Var sToolBarName MyToolBar with Application...

Page 276: ...plication if app ToolbarExists TB_NAME app CreateToolbar TB_NAME app AddAppToolbutton TB_NAME c windows explorer exe Explorer app AddAppToolbutton TB_NAME c windows explorer exe app CurrentFolder Expl...

Page 277: ...amepath with Application fnamepath sToolBarName InputBox VersionText Enter the Toolbar name MyToolbar while ToolbarExists sToolBarName 0 sToolBarName InputBox VersionText Please chose another name MyT...

Page 278: ...cription Boolean Returns True if changes can be re done Example function Main var sMessage sMessage CanRedo with Application If ActiveDocument CanRedo sMessage sMessage Yes Else sMessage sMessage No M...

Page 279: ...Y Syntax CaretPosY integer read only Description The Y axis caret position Example function Main with Application if ActiveDocument CaretPosY 1 ActiveDocument CursorDocStart false Filename Syntax File...

Page 280: ...t using the Lines property might be slow especially for large documents For best results only use Lines to evaluate single lines of text If you must use Lines to update many lines you can increase per...

Page 281: ...0 SelLength Syntax SelLength integer Description Gets and sets the length of the current selection Example function Main var sMessage sMessage The length of the selected text of your document is with...

Page 282: ...tion if ActiveDocument TabIndex 0 DocumentIndex 0 Text Syntax Text OleString Description Gets and sets the complete document text Methods BeginUpdate Syntax BeginUpdate Description Turns off screen up...

Page 283: ...e then the current selection is extended to the new cursor position The following values are allowed CursorLeft CursorRight CursorWordLeft CursorWordRight CursorDown CursorUp CursorPageDown CursorPage...

Page 284: ...this function along with GetPreviousChar in long loops the code can run slowly GetPreviousChar Syntax GetPreviousChar OleVariant Description Returns the previous character GetTagAtCursor Syntax GetTag...

Page 285: ...WordBool WordBool Description Boolean Moves the previous end tag and selects it if wbSelect is True Returns False if no tag is found Example function Main with Application ActiveDocument GotoPreviousE...

Page 286: ...dia com a true InsertText Syntax InsertText InsertStr OleVariant wbOverwriteSelection WordBool Description Boolean Inserts the passed string at the current cursor position If wbOverwriteSelection is T...

Page 287: ...ves changes to the current document Returns True if successful SaveAs Syntax SaveAs wsFileName widestring WordBool Description Boolean Saves changes to the current document to the file specified in th...

Page 288: ...ent column line TextPosToEditorPos Syntax TextPosToEditorPos var nPos OleVariant WordBool Description Boolean Converts an index in a text string in a VBScript script to the corresponding editor positi...

Page 289: ...op through the array var app Application for idx 0 idx app DocumentCount idx sFile app DocumentCache idx Filename Example This VBScript shows how to loop through the array set app Application for idx...

Page 290: ...t was last saved Example function Main var sMessage sMessage Modified with Application If DocumentCache 0 Modified sMessage sMessage Yes Else sMessage sMessage No MessageBox sMessage VersionText 0 Rea...

Page 291: ...xt Syntax Text OleString read only Description File contents of the cached document Example function Main var sMessage sMessage Your document contains the following text n with Application sMessage sM...

Page 292: ...x AddFileToProject const wsFilename WideString WordBool Description Boolean Adds the passed file to the active project The main project folder or a subfolder of the main project must contain the file...

Page 293: ...dProject const wsTargetDir WideString const wbForceLCase wbUp loadOnlyNewer wbEncryptCFML WordBool WordBool Description Boolean Uploads a project based on the passed criteria The wbEncryptCFML paramet...

Page 294: ...ntax IsDirty WordBool read only Description Boolean Differences exist between the project as viewed in HomeSite for Dreamweaver MX and the underlying disk structure IsFileSelected Syntax IsFileSelecte...

Page 295: ...t Syntax CreateProject ProjectName OleVariant ProjectPath OleVariant Description Creates a new project DeployScriptList Syntax DeployScriptList OleVariant Description Lists scripts associated with the...

Page 296: ...der methods FolderAddFile Syntax FolderAddFile Folder OleVariant Filename OleVariant Description Add a file to the specified folder FolderAllFiles Syntax FolderAllFiles Folder OleVariant OleVariant De...

Page 297: ...e OleVariant Description Removes file from specified folder FolderRenameFile Syntax FolderRenameFile Folder OleVariant OldName OleVariant NewName Ole Variant Description Renames a file within a projec...

Page 298: ...Variant Description Lists all project deployment scripts DeploymentScriptRemove Syntax DeploymentScriptRemove ScriptName OleVariant Description Removes a deployment script from the project DeploymentS...

Page 299: ...ProjectManager object 279 DeploymentServerRemove Syntax DeploymentServerRemove ServerName OleVariant Description Removes a deployment server from a project...

Page 300: ...whether the deployment engine creates the missing folders on the target server EncryptCFML Syntax EncryptCFML WordBool read write Description Boolean Determines whether the deployment engine encrypts...

Page 301: ...of the project s stored deployment server list but is added temporarily for custom deployment tasks The following ITServerType values are allowed 1 FTP 2 RDS CheckServerFolders Syntax CheckServerFolde...

Page 302: ...Bool Description Boolean Checks to see if a file exists GetDeployServerName Syntax GetDeployServerName nServer integer WideString Description Returns the name of the server in the server list based on...

Page 303: ...ing nIndex Integer WideString Description Returns the extension of a folder file based on the passed folder name For details see Project folder names on page 285 GetFolderFileName Syntax GetFolderFile...

Page 304: ...ct file PathExists Syntax PathExists const wsFolderName WideString WordBool Description Boolean Checks to see if a path exists SetDeployState Syntax SetDeployState sServerName WideString bServerStatus...

Page 305: ...loy folders Project folder names Project folder names are stored in the following format Project Folder Subfolder1 SubFolder2 SubFolderN where Project represents the name of the project Folder represe...

Page 306: ...Manager OpenProject D Projects Release Notes version 5 CFS Test1 apf Bypass servers and perform local deployment DeploymentManager IsLocalDeployment true Project Server Selections Project Server Deplo...

Page 307: ...you chose for the folder if DeploymentManager IsFolderDeployable sFolderName Iterate through Folder Files for n 0 n DeploymentManager GetFolderFileCount sFolderName 1 n sFromFile DeploymentManager Ge...

Page 308: ...Protocols http www w3 org Protocols a Properties Agent Syntax Agent OleVariant Description Sets and gets the identification of the client that initiates a request Use this property to identify yourse...

Page 309: ...etCustomerRegistration cfm httpPro Cookie Customer John_Doe Path myapp Cust_ID 4567 Path myapp httpPro Get DocName Syntax DocName OleVariant read only Description The document name segment from the re...

Page 310: ...Syntax Proxy OleVariant Description Sets and gets the proxy server Use the GetApplicationSetting function with the following setting constants 50 and 51 to extract the users proxy server settings var...

Page 311: ...nd the Reason Phrase is for the human user The following are some of the Status Code Reason Phrase pairs 200 OK 201 Created 202 Accepted 204 No Content 301 Moved Permanently 302 Moved Temporarily 304...

Page 312: ...from a source that does not have its own URI such as input from the user s keyboard Sender Syntax Sender OleVariant Description Sets and gets the sender parameter SendStreamAsString Syntax SendStreamA...

Page 313: ...yntax Username OleVariant Description Sets and gets the web server access username Methods Abort Syntax Abort Description Aborts the current HTTP operation Get Syntax Get Description Performs an HTTP...

Page 314: ...httpPro ModifiedSince n Cookie httpPro Cookie n ContentTypePost httpPro ContentTypePost n MultiThreaded httpPro MultiThreaded n State httpPro State n ContentLength httpPro ContentLength n ContentType...

Page 315: ...10 10 99 var PostStream Customer_ID httpPro URLEncode CustomerID ProductNumber httpPro URLEncode ProductID SaleDate httpPro URLEncode DateSold httpPro SendStreamAsString PostStream httpPro Post var sO...

Page 316: ...ttpPro app HTTPProvider httpPro URL http 127 0 0 1 test zip httpPro Get var bOverwrite false var sErrorMsg httpPro SaveReceivedStreamToFile d downloads test zip bOverwrite if sErrorMsg app MessageBox...

Page 317: ...show a reason sSource sSource The request could not be completed br br li sSource sSource HTTPProvider ReasonPhrase font li sMessage The source of the requested page has been copied successfully n sMe...

Page 318: ...ile You can set the value from 0 to 9 0 represents no compression 1 is fastest compression and 9 is the slowest but most size efficient compression ExtractionDir Syntax ExtractionDir OleVariant Descri...

Page 319: ...hsOKInfo 64 var app Application var ZIPPro app ZIPProvider ZIPPro ExtractionDir d ExtractHere ZIPPro ZipFile d downloads test zip var ResultCode ZIPPro Extract somefile exe app MessageBox Return Code...

Page 320: ...neral else if nStatusCode 30 sMessage WarningNoZipFile else if nStatusCode 40 sMessage WarningFilesSkipped else if nStatusCode 50 sMessage WarningEmptyZipFile else if nStatusCode 100 sMessage ErrorNoZ...

Page 321: ...entire directory using wildcards If left an empty string all files are extracted The function returns a status code that you can investigate to determine whether the operation succeeded Extract Synta...

Page 322: ...n Use this function to determine whether a specific element in an archive is a system file The index value can be from 0 to FileCount 1 FileIsVolume Syntax FileIsVolume nIndex Integer WordBool Descrip...

Page 323: ...ZIPPro FileName x cfabort vtm app MessageBox quot File found in the archive quot quot ZIPProvider quot hsOKInfo FileSize Syntax FileSize nIndex Integer Double Description Returns the size of an existi...

Page 324: ...color Blue sTable sTable Names and properties of all open documents sTable sTable FONT B br br br sTable sTable TABLE border 1 width 500 newline sTable sTable newline TR TD B Document Name B TD sTable...

Page 325: ...enter No td td center close row sTable sTable td tr newline count increment count by 1 sTable sTable newline table br br sTable sTable b i font color 0000ff You ran this script inside font i b sTable...

Page 326: ...t AllaireClientApp TAllaireClientApp set app Application save the index of the current document so it can be returned to nCurrentIdx app DocumentIndex start the table sTable b font color Blue Names of...

Page 327: ...the new document created above app ActiveDocument InsertText sTable False switch to browse mode app CurrentView 2 wait for user to re enter edit mode while app CurrentView 1 Wait is a home grown rout...

Page 328: ...enter the script name After this key is read the program deletes the entries so that they do not execute again Sample startup script This script adds a toolbar for an application Add a string entry w...

Page 329: ...Third party add ins 309 Toolbutton SC add VTM toolbutton app AddVTMToolbutton TB_NAME app AppPath Extensions TagDefs HTML div vtm VTM Toolbutton VT End Sub...

Page 330: ...7 CMDID_cmdFileSave 8 CMDID_cmdFileSaveAs 9 CMDID_cmdFileSaveAsTemplate 10 CMDID_cmdFileSaveAll 11 CMDID_cmdFileReload 12 CMDID_cmdFileInsert 13 CMDID_cmdFileConvertTextFile 14 CMDID_cmdFilePrint 15...

Page 331: ...ID_cmdEditDeleteToEOL 47 CMDID_cmdEditDeleteWordLeft 48 CMDID_cmdEditDeleteWordRight 49 CMDID_cmdEditSelectAll 50 CMDID_cmdEditConvertTagCase 51 CMDID_cmdEditGotoLine 52 CMDID_cmdEditGotoPreviousStart...

Page 332: ...80 CMDID_cmdToolsSpellCheckAll 81 CMDID_cmdToolsSpellMark 82 CMDID_cmdToolsDocumentWeight 83 CMDID_cmdToolsThumbnails 84 CMDID_cmdToolsVerifyLinks 85 CMDID_cmdToolsValidateDoc 86 CMDID_cmdToolsValida...

Page 333: ...lChar 106 CMDID_cmdViewTagInsight 107 CMDID_cmdViewTagTip 108 CMDID_cmdViewEditorToolbar 109 CMDID_cmdViewEditorTab 110 CMDID_cmdViewToggleQuickBar 111 CMDID_cmdViewResults 112 CMDID_cmdOptionsSetting...

Page 334: ...emplate to use when creating new documents SET_SHOW_RESTAB 6 Display the resource tab SET_CURRENT_RESTAB 7 Page in resource tab active when closed reset at startup SET_RESTAB_ALIGN 8 Set Resources tab...

Page 335: ...TAGHELP_DELAY 29 Milliseconds to delay tag insight SET_LOWERCASE_TAGS 30 Lowercase inserted tags SET_HEX_COLORS 31 Always use hex values instead of color names SET_DHTMLED_ALLOW_FRAMES 32 If True allo...

Page 336: ...Set height in pixels for files tab pane SET_PROXY_NAME 50 Set the proxy port name for link verification and open from web SET_PROXY_PORT 51 Set the proxy port for link verification and open from web S...

Page 337: ...ument overrides default template SET_SHOW_SHORTCUT_IN_HINTS 85 Show keyboard shortcuts in toolbutton hints SET_INTERNAL_BROWSE_MOZILLA 86 Use MOZILLA as the internal browser SET_OEM_CONVERSION 87 Cont...

Page 338: ...T_SPECIALCHAR_LAYOUT 131 Layout orientation of special character toolbar SET_DREAMWEAVER_INTEGRATION 140 Set Dreamweaver MX integration and file save prompt SET_DREAMWEAVER_LAUNCH_TYPE 149 Set Dreamwe...

Page 339: ...ctory SET_DIR_AUTOFORMATTERS 168 Set Codesweeper profile directory SET_DIR_SAVED_SEARCHES 169 Set location of saved searches directory SET_DIR_HTML_HELP 170 Set location of html Help files directory S...

Page 340: ...tips SET_STYLE_EDIT_WND_CLASS 216 Used to dynamically invoke a style editor StyleEd or TopStyle SET_STYLE_EDIT_OLE_OBJECT 217 Used to dynamically invoke a style editor StyleEd or TopStyle SET_EDITOR_F...

Page 341: ...23 See fAllaireClientMain ShowEditor Pos SET_EDITOR_LINE_NUMBERS 324 Set line numbers in editor gutter SET_EDITOR_AUTOPOUND 325 Set auto insertion of pound sign SET_EDITOR_CHARSET 326 Set editor chara...

Page 342: ...when user clicks toolbutton SET_CFS_HELP_SERVER CFStudio only 61 Server to map to in dxWebBrowser DoMSIENewWi ndow when user browses snippets SET_CFS_ADJUST_HELP_EXAMPLES CFStudio only 62 If False th...

Page 343: ...ebugger stops processing and waits for your input browser Program that displays markup language documents and other documents based on a document s structure Different Web browsers have different rule...

Page 344: ...or extranet so that only a select group of people have access Many companies have their own intranet Web site and most business to business e commerce Web sites are extranets accessible only by paying...

Page 345: ...written in HTML HTTP servers manage the traffic of HTTP requests and responses Users make an HTTP request every time they enter a URL beginning with http image map Image with more than one associated...

Page 346: ...f something else for example code snippets are written to UserData on whatever drive and directory that you installed HomeSite for Dreamweaver MX Other examples of paths URLs such as http www macromed...

Page 347: ...plication server such as ColdFusion or JRun Server handles the business logic of a Web application and can process all sorts of Web languages beyond HTML for example Perl CGI scripts servlets ActiveSe...

Page 348: ...would be a free flow of information commerce and communication watch Expression or variable that you are monitoring so that you can see its value at given points while the debugger steps through your...

Page 349: ...n be stored and retrieved from a database rendered in a variety of formats and used for a variety of purposes for example on a Web page hand held computer or cell phone or for a cookbook recipe card c...

Page 350: ...330 Glossary...

Page 351: ...pector 78 preserving with CodeSweepers 114 selecting blocks 71 tools generating 58 code snippets See snippets code templates about 57 editing 57 using 57 CodeSweepers about 114 configuring 118 control...

Page 352: ...for templates and wizards 59 for FTP servers 16 displaying contents of Title tag 187 external links 187 source control toolbar 150 text files in Help tree 40 toolbars 32 docking QuickBar tabs 32 toolb...

Page 353: ...ing toolbars 32 HTML Tidy about 114 creating CodeSweepers 116 deleting CodeSweepers 115 117 editing CodeSweepers 115 116 upgrading 114 HTTPProvider Object 288 hyperlinks See links I ICW See initial co...

Page 354: ...odeSweeper 116 default mappings 24 defaults for deployment 160 defaults for projects 140 Editor 70 file types for color coding 112 folder deployment 163 importing from previous versions 3 initial proj...

Page 355: ...king with 146 Resources window working in 28 Results window about 30 working in 172 results generating document of 173 reverting to installed certificate and key 18 reviewing deployment results 169 ro...

Page 356: ...h 75 opening 75 using 75 viewing Help in 35 VTML versus standard 75 Tag Insight about 55 configuring 55 editing tags with 55 inserting tags with 55 Tag Inspector about 78 editing tag definitions with...

Page 357: ...mandID values 310 creating toolbar for custom scripts in 226 DeploymentManager Object 280 DocumentCache Object 269 example Add script 300 example ApplicationType script 227 example cookie script 289 e...

Page 358: ...338 Index...

Reviews: