Ten Killer Tips for Dreamweaver MX 2004
Joseph Lowery and Angela Buraglia

Don't Wait for Me, FTP!
Dreamweaver is loaded with lots of little time-savers, but this is one of the few with which you can specify the time being saved. Have you ever started an FTP session to transfer a slew of files and decided to take a break — only to come back 10 minutes later and see a dialog on the screen asking permission to overwrite the second file in the queue? Very frustrating. With Dreamweaver FTP, such dialog's default action (typically OK) can be automatically accepted after a set number of seconds. Check out the Site category of Preferences, in the File Transfer Options area. If you check the Select Default Actions in Dialogs option, you can set how long you want Dreamweaver to wait before proceeding.

Next Document Please
Moving from document to document doesn't require you to use your mouse. Similar to how you can Alt+Tab (Option+Tab) between different programs or windows in your task bar, Dreamweaver offers a shortcut for moving between documents: Ctrl+Tab (Command+Tab). Use the shortcut whenever you have a Document window in focus, and the next document in line will be brought to the front. Add the Shift key to the combo and you'll move backward through the file lineup.

Maintain Column Widths
There's nothing special about dragging a cell's border to adjust its width. The table's width stays the same and all column widths change. It used to be that when I wanted a table to change width, I'd have to carefully drag the table border and then make adjustments to column widths individually. Now you can do both in just one step. If you hold down the Shift key while dragging a cell's border, the other column widths remain their original size and only the selected column's width and the table's width change. When you have the key pressed and you start to drag, you'll even see some handy lines that indicate the placement of the adjusted columns.

Close Pop-up Window
What do you do if you want to give users a way to close a pop-up window that they're viewing? Provide a Close link, of course. Just select the text or image that you want to use as a link, and then in the Link field of the Property inspector, enter the following code: javascript:self.close();

Want the window to close automatically if the user leaves the page without closing it? Add the script to an onBlur event in the <body> tag. As if that isn't easy enough, there's a free extension, DWfaq Close Pop-up Window, which you can apply from the Behaviors panel. You can find the extension here.

Browser Checking Without the Browser
How do you check your pages against multiple browsers when you can't possibly have all the browsers installed on your machine? The Dreamweaver Target Browser Check is one often-overlooked alternative that gives you a way to check your entire site against 16 major browser versions. To see the possibilities, choose Window > Results, then click the Target Browser Check tab, and then select the green arrow to get started.

Selecting all the browser versions in the Target Browser Check will definitely lead you to say, "Well, you can't please all the people all the time," unless your page is just bare text. It's best to decide which browsers you intend to support and just run Target Browser Check against them. I, for example, rarely check for anything below a version 4 browser these days — it all depends on the client's web statistics. If the logs show that 15% of the site's visitors are using Netscape 2.0, I'm going to be sure the site looks acceptable in that browser.

Untitled Tip
Dreamweaver has a nifty feature that checks your entire site for untitled documents and gives you a list of them so that you can take corrective measures. Choose Site > Reports, check Untitled Documents, and then click the Run button. All untitled documents in your site will appear in the Results panel. Double-click the file to open it, and then give the document a new title in the Document toolbar.

I'd Go Offline If Only I Had the Cache
Don't always have a data source connection? Fear not. You can continue working, you lucky dog, as long as your cache is enabled. You probably didn't realize it, but to speed up development of web applications, Dreamweaver caches recordsets and other dynamic content such as session variables and JavaBeans. This means that if you drop your data source connection for whatever reason, you can still apply the dynamic content to the page by dragging elements from the Bindings panel or inserting a server behavior. To make sure the cache is up and running, choose the Options menu from the Bindings panel; by default, the Cache option is checked. Unfortunately, the cache is not all-powerful — you won't be able to modify the existing recordsets, add new ones, or enter into Live Data view without an active data source connection. But then, you know what they say: "Cache isn't everything."

Eliminate the Internet Explorer 6 Image Toolbar
Surf the Internet using Internet Explorer 6 and sooner or later you'll get a glimpse of the Image toolbar. Usually an image that is equal to or more than 200px by 200px is required to make the Image toolbar appear, but there are other factors that can allow for it to be shown on images as small as 124px by 124px. I try not to worry about what will make the Image toolbar appear and just add the <meta> tag needed to turn it off. In the Head menu, in the HTML category of the Insert bar, click the Meta object. Select the HTTP equivalent option from the Attributes drop-down list, type <meta> in the Value field, type 'no' in the Content field, and then click OK. The inserted meta tag in the head of your page should say <meta httpequiv="imagetoolbar" content="no">. You also can handle the Image toolbar on a case-by-case basis by adding a galleryimg attribute to the <img> tag with a value of no, using the Properties section of the Tag inspector or via Code view.

Code Line-ing up Tables
One of the neatest tricks found in Code view — and I like my neat tricks — is the Convert Lines to Table option. If you've got a bunch of <form> tags that you want to pretty up in a table, just highlight the mess of them (without grabbing the <form> tags themselves), right-click (Ctrl+Click), and choose Selection > Convert Lines to Table. Presto-table-o, all your separate lines are in a <td> tag! However, be careful not to grab the <head> or <body> tags in your selection when issuing this command; Dreamweaver throws those into the table as well, and your page is, shall we say, toast.

Replacing Within Results
Sooner or later, you'll do a Find and Replace (Edit > Find and Replace), but your search will yield far more results than what needs changing. Almost everyone I've asked will open each file and carefully execute each replace. Everyone else uses fancy regular expressions to get exactly what they're after, which can take longer than what you are about to learn how to do. Suppose you have too many results from a search you've performed. Bring back the Find and Replace dialog by clicking the green arrow on the left of the Results panel. In the list of search results in the Results panel, Ctrl+Click (Command+Click) individual noncontiguous results, or Shift+Click once and then a second time to select all results between and including the ones you Shift+Clicked. Now choose Replace (I said Replace, not Replace All) in the Find and Replace dialog. The files that are modified get marked by a green dot to the left of the filenames in the Results panel. Just think of all the time you'll save from this tip alone!

As with any Find and Replace you perform in files that aren't open, make sure you make a backup first, just in case.

Lowery/Buraglia, MACROMEDIA DREAMWEAVER MX 2004 KILLER TIPS, (C) 2004 New Riders Publishing Reproduced by permission of Pearson Education, Inc. Publishing as New Rider Publishing.ALL RIGHTS RESERVED.