Tải bản đầy đủ (.pdf) (123 trang)

Dreamweaver MX 2004 Bible phần 1 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.06 MB, 123 trang )

Dreamweaver
®
MX 2004 Bible
Joseph W. Lowery
543504 FM.qxd 12/10/03 10:42 PM Page iii
543504 FM.qxd 12/10/03 10:42 PM Page ii
Dreamweaver
®
MX 2004 Bible
543504 FM.qxd 12/10/03 10:42 PM Page i
543504 FM.qxd 12/10/03 10:42 PM Page ii
Dreamweaver
®
MX 2004 Bible
Joseph W. Lowery
543504 FM.qxd 12/10/03 10:42 PM Page iii
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: WHILE THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST
EFFORTS IN PREPARING THIS BOOK, THEY MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE
ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR
EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS. THE ADVICE AND STRATEGIES CONTAINED
HEREIN MAY NOT BE SUITABLE FOR YOUR SITUATION. YOU SHOULD CONSULT WITH A PROFESSIONAL WHERE
APPROPRIATE. NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER
COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER
DAMAGES.
Dreamweaver
®
MX 2004 Bible
Published by
Wiley Publishing, Inc.


10475 Crosspoint Blvd.
Indianapolis, IN 46256
www.wiley.com
Copyright  2004 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
Library of Congress Control Number: 2003114747
ISBN: 0-7645-4350-4
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
1B/RT/QR/QU/IN
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA
01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the Legal
Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447,
E-Mail:
For general information on our other products and services or to obtain technical support, please contact our Customer
Care Department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in
electronic books.
Trademarks: Wiley, the Wiley Publishing logo and related trade dress are trademarks or registered trademarks of John
Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written
permission. Macromedia Fireworks MX 2004, Dreamweaver MX 2004, Flash MX 2004, FreeHand MX, ColdFusion MX 6.1 for
Professionals, JRun Server v4, and Macromedia Contribute 2.0 copyright  1995-2003. Macromedia, Inc., 600 Townsend
Street, San Francisco, CA 94103 USA. All Rights Reserved. Macromedia, Fireworks, Dreamweaver, Flash, FreeHand,
ColdFusion, JRun, and Contribute are trademarks or registered trademarks of Macromedia, Inc. in the United States and/or
other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated
with any product or vendor mentioned in this book.
is a trademark of Wiley Publishing, Inc.

543504 FM.qxd 12/10/03 10:42 PM Page iv
About the Author
Joseph Lowery has been writing about computers and new technology since 1981. He is the
author of the previous editions of Dreamweaver Bible and Fireworks Bible as well as of Buying
Online For Dummies (all published by Wiley). He is also the author of Joseph Lowery’s Beyond
Dreamweaver, Dreamweaver MX 2004 Killer Tips (with Angela Buraglia), and Dreamweaver MX
2004 Web Application Recipes (with Eric Ott), all published by New Riders. He recently co-
wrote a book on Flash with designer Hillman Curtis and has also written books on HTML and
using the Internet for business. His books are international bestsellers, having sold more than
350,000 copies worldwide in ten different languages. Joe is also a consultant and trainer and
has presented at Seybold in both Boston and San Francisco, Macromedia conferences
in the U.S. and Europe, and at ThunderLizard’s Web Design World. As a partner in Deva
Associates, Ltd., Joseph developed the Deva Tools for Dreamweaver set of navigational exten-
sions and, with Edoardo Zubler, created FlashBang!, a set of Flash navigation tools. Joseph
and his wife, dancer/choreographer Debra Wanner, have a daughter, Margot.
About the Contributor
Daniel Short never planned to be a Web designer; it just happened. When he was serving in
the Army, he began by tearing apart computers. Eventually he was putting together Web
sites. Dan is a devoted Macromedian (and Team Macromedia volunteer) and uses almost the
entire Macromedia Web Design Suite, including Fireworks and Macromedia Flash. He’s been
doing the Web gig since the end of 1998 and has had great luck building his Web design busi-
ness through Web Shorts Site Design. Dan helps maintain several HTML and Dreamweaver
reference sites including DreamweaverFAQ.com, for which he created the style changer and
all ASP functionality, including the Snippets Exchange. Dan has also written articles for sev-
eral resource sites, including AListApart.com, run by Jeffrey Zeldman, and Spider Food.net,
run by J.K. Bowman. Dan is a contributing author for Dreamweaver MX Magic (published by
New Riders).
543504 FM.qxd 12/10/03 10:42 PM Page v
Credits
Executive Editor

Chris Webb
Senior Project Editor
Jodi Jensen
Technical Editors
Derren Whiteman
Charles Brown
Production Editor
Gabrielle Nabi
Copy Editor
Mary Lagu
Editorial Manager
Mary Beth Wakefield
Vice President and Executive Group
Publisher
Richard Swadley
Vice President and Executive
Publisher
Robert Ipsen
Vice President and Publisher
Joseph B. Wikert
Executive Editorial Director
Mary Bednarek
Project Coordinator
Ryan Steffen
Graphics and Production Specialists
Amanda Carter
Lauren Goddard
Joyce Haughey
Jennifer Heleine
Michael Kruzil

Kristin McMullan
Lynsey Osborn
Heather Ryan
Jacque Schneider
Quality Control Technicians
Carl William Pierce
Kathy Simpson
Brian H. Walls
Senior Permissions Editor
Carmen Krikorian
Media Development Specialist
Angela Denny
Proofreading and Indexing
TECHBOOKS Production Services
Cover Image
Murder By Design
543504 FM.qxd 12/10/03 10:42 PM Page vi
For my good friend and co-worker, Derren Whiteman,
in appreciation of the over-the-top support and technical expertise
he’s generously provided to me and the entire Dreamweaver
community throughout the years. Beauty, eh?
543504 FM.qxd 12/10/03 10:42 PM Page vii
543504 FM.qxd 12/10/03 10:42 PM Page viii
Foreword
E
ach year, the Macromedia engineering team visits a number of customers to better under-
stand their workflow and the challenges they face. In other words, what does and doesn’t
work, and what could work better. Several trends were apparent from our last round of visits:
Cascading Style Sheets (CSS) had hit the mainstream, and working designers and developers
had to be more productive in less time. Moreover, new Dreamweaver users were somewhat

overwhelmed with all the choices available in the program. After absorbing the feedback from
both long-time and beginning users, the engineers returned to the lab to develop the latest
version of the world’s leading Web-authoring tool: Dreamweaver MX 2004.
The capability to add and edit CSS styles has been a key feature in Dreamweaver since release
1.0. However, designers have begun to depend increasingly on CSS, and it was time to kick it
up a notch. You’ll find the CSS rendering in Dreamweaver MX 2004 to be vastly improved,
enabling Web developers to create pure CSS-based layouts. A new CSS related panel displays
selected styles and allows for direct in-line editing of any existing or newly applied attribute.
Once your CSS is applied, you can examine any tag and see instantly what style rules are
applied; Dreamweaver also indicates which rules remain relevant and which are overruled.
Better yet, Dreamweaver tells you why.
The concept of combining functionality with information is not a new one in Dreamweaver;
given the increasingly complex world of Web authoring, we feel it’s important that designers
be given as much contextual information as possible. You’ll see this philosophy carried
out in the new Browser Check system in Dreamweaver MX 2004, which automatically flags
any browser-specific conflicts when a page is opened. It’s up to the designer to choose which
browsers— and what versions —he or she is coding for. After an error is identified, you can
double-click the listing in the Results panel to go right to the problem, marked with a red
squiggly underline in Code view. Hover your mouse over the error, and Dreamweaver tells
you why the code is marked and offers a possible solution. Functionality + Information =
Increased Productivity.
We’ve also looked toward enhancing productivity in other ways. The new Start Page gives
users a quick way to launch projects or return to recent ones. For new users, it helps to jump-
start development with quick access to pre-built templates and tutorials. Our innovative
Expanded Table mode takes the guesswork out of cell selection and cursor placement whether
you’re working with simple or nested tables. The entire interface— from menus to Insert bar —
has been streamlined and re-organized for a more intuitive workflow. We’ve even added the
capability to make quick edits to existing sites directly on a remote server so that you don’t
have to set up a site locally. Dreamweaver MX 2004 strives to be technologically agnostic:
whether you’re building static Web sites or developing for any of the leading server models,

Dreamweaver allows you to work the way you prefer.
543504 FM.qxd 12/10/03 10:42 PM Page ix
x
Foreword
Revising world-class software as multifaceted as Dreamweaver is truly a team effort — and
the team is larger than you’d expect. Although the highly skilled and dedicated engineering
staff is responsible for the final release, they couldn’t do it without the very active and vocal
Dreamweaver community urging them on. Included in that community are people like Joseph
Lowery, whose book you hold in your hands. Joe is a true Dreamweaver expert who knows —
and knows how to explain — Dreamweaver from top to bottom, <a> tag to z-index.
While each new version is a milestone for the Dreamweaver team, it’s only a stop along the
way. We’re always looking for ways to make Dreamweaver the best tool for you to bring your
visions into reality. We can’t wait to see what dreams you realize.
Jennifer Taylor
Dreamweaver Product Manager
Macromedia, Inc.
543504 FM.qxd 12/10/03 10:42 PM Page x
Preface
D
reamweaver MX 2004 stands at the center of a complex series of overlapping worlds. In
one realm, designers of static Web pages are looking to expand their knowledge base into
data-driven sites. Over there, you’ll find application developers— some savvy in Active Server
Pages and ASP.NET, some in ColdFusion, and others in JavaServer Pages and PHP — anxious
to develop for the Internet. The spectrum of experience in both camps runs the gamut from
eager novice to experienced professional, all of whom benefit from the advanced style capa-
bilities of Cascading Style Sheets (CSS). There’s yet another group of prospective Web crafts-
men and artists who want to do it all and are looking for a place to start. Dreamweaver MX
2004 is the one program robust enough for them all, and the Dreamweaver MX 2004 Bible is
your guidebook to all its features and capabilities.
What’s in a name? In the case of Macromedia’s Dreamweaver, you find one of the most appro-

priate product names around. Web page design is a blend of art and craft; whether you’re a
deadline-driven professional or a vision-filled amateur, Dreamweaver provides an intuitive
way to make your Web visions a reality. Dreamweaver implies development, and it excels at
producing multifaceted Web pages that bring content locked in a data store to the surface.
To use this book, you need only two items: the Dreamweaver software and a desire to make
cutting-edge Web pages. (Actually, you don’t even need Dreamweaver to begin; the CD-ROM
that accompanies this book contains a trial version.) From quick design prototyping to ongo-
ing Web site management, Dreamweaver automates and simplifies much of a Webmaster’s
workload. Dreamweaver is not only the first Web authoring tool to bring the ease of visual
editing to an HTML-code–oriented world, it also brings a point-and-click interface to complex
coding whether server-side or client-side. The Dreamweaver MX 2004 Bible is designed to
help you master every nuance of the program. Are you styling your pages with CSS? Are you
building multipage Web applications? Are you creating a straightforward layout with the visual
editor? Do you need to extend Dreamweaver’s capabilities by building your own custom
objects? With Dreamweaver and this book, you can weave your dreams into reality for the
entire world to experience.
What’s New in Dreamweaver MX
Since its inception, Dreamweaver has striven to serve two masters: professional Web devel-
opers, savvy in technique and used to hand-coding, and beginning designers looking to over-
come their lack of HTML and JavaScript expertise. Dreamweaver MX 2004 attempts to continue
the balancing act of satisfying the two different markets— and, in large part, it succeeds.
Innovations in Dreamweaver MX 2004 can be categorized into three areas: workspace and
productivity improvements, CSS capabilities, and Web-application building.
543504 FM.qxd 12/10/03 10:42 PM Page xi
xii
Dreamweaver MX 2004 Bible
Workspace and productivity enhancements
From your very first launch of Dreamweaver MX 2004, you’ll notice the design environment
upgrade. The Start Page is not only attractive; it’s highly functional and offers one-click access
to many of Dreamweaver’s starting points. As you continue your tour, you’ll find Dreamweaver

more streamlined and accessible — from the restructured menus to the revamped Insert bar.
One of the changes to the Insert bar is the new Favorites category, where you can make
Dreamweaver even more productive by grouping the objects you use most frequently into
one convenient location.
Other workspace changes are not as immediately noticeable, but just as significant. Copy and
paste part of any Microsoft Word or Excel document, and Dreamweaver transparently trans-
forms the content into lean HTML. Transfer your page with the new Secure FTP (SFTP) proto-
col, and Dreamweaver automatically protects your vital information.
Some productivity enhancements are optional and available on demand. Dreamweaver’s
new Expanded mode takes the guesswork out of precise table manipulation by temporarily
expanding the cell padding and spacing while forcing the border to display; press F6 to toggle
in and out of this new design-time environment. Should your work stretch over multiple ses-
sions, Dreamweaver provides a new saved desktop option. With this option enabled, docu-
ments left open when you quit Dreamweaver are automatically re-opened the next time you
run the program.
Cutting-edge CSS capabilities
Perhaps the greatest feature in the new release of Dreamweaver is not a feature at all — it’s a
major shift in design focus. Because its creators recognized the ever-growing role played by
Cascading Style Sheets in Web design, Dreamweaver MX 2004 has been re-engineered to be
CSS-centric from top to bottom. If you’re just starting out using CSS, Dreamweaver helps you
make the right choices by creating styles rather than adding deprecated
<font> tags when
you format your text from the Property inspector. Moreoever, Dreamweaver won’t create
unnecessary styles: If you’ve already got one style that applies Arial type in dark gray at
14 pixels, Dreamweaver uses that style rather than making a new one when you choose those
same attributes.
For the designer who is comfortable with CSS, Dreamweaver brings style-sheet editing right
up-front. Select any tag and the Relevant CSS panel displays all the applicable CSS rules— it
even shows you which ones are applied but overridden so that you can modify your styles as
needed. The Relevant CSS panel makes each exposed style attribute and value immediately

editable, whether the style is defined on the same page or in an external file.
All this stylistic prowess is immediately apparent during design time. The CSS rendering is
vastly improved in Dreamweaver MX 2004 and most CSS level 1 and level 2 features are faith-
fully reproduced. This enhanced rendering capability means you spend more time designing
and less time previewing your design— a major productivity boost.
Web application advancements
Numerous improvements have been applied to the various supported server models. PHP
developers can now take advantage of Dreamweaver’s Master Detail Page Set object to quickly
create the foundation for one of the Web’s most common applications. In addition, authenti-
cation server behaviors have now been added to the PHP server model, greatly simplifying
the task of protecting Intranet and other pages from unauthorized viewing. Developers in the
ASP.NET environment will appreciate the added support for various form controls.
543504 FM.qxd 12/10/03 10:42 PM Page xii
xiii
Preface
Many developers — regardless of their server model of choice — are required to update or
otherwise maintain sections of an existing Web site. Because there is no need to create an on-
going site locally, these developers just need a direct connection to the server. Dreamweaver
MX 2004 now offers so-called siteless editing for FTP and, for ColdFusion developers, RDS
connections.
Who Should Read This Book?
Dreamweaver attracts a wide range of Web developers. Because it’s the first Web authoring
tool that doesn’t rewrite original code, veteran designers are drawn to using Dreamweaver as
their first visual editor. Because it also automates complicated effects, beginning Web design-
ers are interested in Dreamweaver’s power and performance. Dreamweaver MX 2004 Bible
addresses the full spectrum of Web professionals, providing basic information on HTML if
you’re just starting, as well as advanced tips and tricks for seasoned pros. Moreover, this
book is a complete reference for everyone working with Dreamweaver on a daily basis.
What Hardware and Software Do You Need?
Dreamweaver MX 2004 Bible includes coverage of Dreamweaver MX 2004. If you don’t

own a copy of the program, you can use the trial version on this book’s CD-ROM. Written
to be platform-independent, this book covers both Macintosh and Windows versions of
Dreamweaver MX 2004.
Macintosh
Macromedia recommends the following minimum requirements for running Dreamweaver
on a Macintosh:
✦ Power Macintosh PowerPC 500 MHz (G3 or higher recommended)
✦ Mac OS 10.2.6
✦ 128MB of available RAM
✦ 275MB of available disk space
✦ 256-color monitor capable of 800×600 resolution (OS X requires thousands of colors)
✦ CD-ROM drive
Windows
Macromedia recommends the following minimum requirements for running Dreamweaver
on a Windows system:
✦ Intel Pentium III processor, 600MHz or equivalent
✦ Windows 98 SE, 2000, XP, or Windows Server 2003
✦ 128MB of available RAM
✦ 275MB of available disk space
✦ 256-color monitor capable of 800 × 600 resolution
✦ CD-ROM drive
543504 FM.qxd 12/10/03 10:42 PM Page xiii
xiv
Dreamweaver MX 2004 Bible
These are the minimum requirements. As with all graphics-based design tools, more capa-
bility is definitely better for using Dreamweaver, especially in terms of memory and proces-
sor speed.
How This Book Is Organized
Dreamweaver MX 2004 Bible can take you from raw beginner to full-fledged professional if
read cover to cover. However, you’re more likely to read each section as needed, taking the

necessary information and coming back later. To facilitate this approach, Dreamweaver
MX 2004 Bible is divided into seven major task-oriented parts. After you’re familiar with
Dreamweaver, feel free to skip around the book, using it as a reference guide as you build up
your own knowledge base.
The early chapters present the basics, and all chapters contain clearly written steps for the
tasks you need to perform. In later chapters, you encounter sections labeled Dreamweaver
Techniques. Dreamweaver Techniques are step-by-step instructions for accomplishing specific
Web designer tasks — for example, building an image map that uses rollovers or eliminating
underlines from hyperlinks through Cascading Style Sheets. Naturally, you can also use the
Dreamweaver Techniques as stepping stones for your own explorations into Web page creation.
If you’re running Dreamweaver while reading this book, don’t forget to use the CD-ROM. An
integral element of the book, the accompanying CD-ROM offers a vast number of additional
Dreamweaver server behaviors, behaviors, objects, commands, and other extensions, in addi-
tion to relevant code from the book.
Part I — Dreamweaver MX Basics
Part I begins with an overview of Dreamweaver’s philosophy and design. To get the most out
of the program, you need to understand the key advantages it offers over other authoring
programs and their deficiencies, which Dreamweaver addresses. Part I takes you all the way
to setting up your first site. In Chapter 2, you get an overview of one man’s Web development
process— mine — as an introduction to working with Dreamweaver. The other opening chap-
ters give you a full reference to the Dreamweaver interface and all its customizable features.
Part II — Web Design and Layout: Fundamentals
Although Dreamweaver is partly a visual design tool, its roots derive from the language of the
Web: HTML. Part II gives you a solid foundation in the basics of HTML, even if you’ve never
seen code. It also shows you how to get the most out of Dreamweaver’s code environment
with any language. Chapter 6 describes what you need to know about the overall structure of
a Web page, including the all-important
<meta> tags.
Reflecting the current emphasis in Web design on Cascading Style Sheets, Chapter 7 lays the
foundation to CSS. In this chapter, you learn the basics of CSS, as well as how to define and

apply styles in Dreamweaver. Following the introduction to CSS, you learn the three funda-
mentals of static Web pages: text, images, and links. In Chapters 8, 9, and 10, you explore how
to completely incorporate these elements.
Note
543504 FM.qxd 12/10/03 10:42 PM Page xiv
xv
Preface
Part III — Advanced Design Tools and Techniques
After you master the basics, you’re ready to learn about some of Dreamweaver’s true power
tools in Part IV. First up is one of the most important constructs of HTML:
<div> tags, also
known in Dreamweaver as layers. Chapter 11 examines this brave new world of pixel-perfect
positioning, layers that fly in and then disappear as if by magic, and Web sites that can change
their look and feel at the click of a mouse. Chapter 12 offers an in-depth look at the capabili-
ties of Dreamweaver behaviors. These bring a great deal of interactivity to layers specifically
and to your Web page in general. Each standard behavior is covered in detail with step-by-
step instructions.
Chapter 13 examines the various uses of tables — from a clear presentation of data to organiz-
ing entire Web pages. Here you learn how to use Dreamweaver’s visual table editing capabili-
ties to resize and reshape your HTML tables quickly. Forms are an essential element in dynamic
Web page design, and you learn all about them in Chapter 14. Chapter 15 examines another
fundamental HTML option: lists. You study the list in all its forms: numbered lists, bulleted
lists, definition lists, nested lists, and more.
Chapter 16 is devoted to image maps and shows you how to use Dreamweaver’s built-in
Image Map tools to create client-side image maps. The chapter also explains how you can
build server-side image maps and demonstrates a revised technique for creating image map
rollovers. Chapter 17 investigates the somewhat complex world of frames. You see how
Dreamweaver has greatly simplified the task of building and managing these multifile cre-
ations, particularly with the Frame objects. You also learn how to handle more advanced
design tasks such as updating multiple frames with just one click.

Part IV — Incorporating Dynamic Data
Chapter 18 begins an in-depth investigation of Dreamweaver’s power to create dynamic Web
pages by describing how to set up your basic connections and recordsets. Chapter 19 explains
how to insert text from a data source on to your Web page and how to format it after it’s
incorporated. You also see how to relate other Web page elements — such as images, Flash
movies, and other media files — to a data source. Chapter 20 continues the exploration by
delving into Dreamweaver’s powerful Repeat Region server behavior as well as discussing
techniques for hiding and showing your data at will.
One of Dreamweaver’s most useful features, the Live Data Preview, is explored extensively in
Chapter 21. Chapter 22 enters the world of multipage applications and explains how variables
and other data can be passed from one page to another.
Part V — Adding Multimedia Elements
In recent years, the Web has moved from a relatively static display of text and simple images
to a full-blown multimedia circus with streaming video, background music, and interactive
animations. Part V contains the power tools for incorporating various media files into your
Web site.
Graphics remain the key medium on the Web today, and Macromedia’s Fireworks is a top-notch
graphics generator. Chapter 23 delves into methods for incorporating Fireworks graphics —
with all the requisite rollover and other code intact. Special focus is given to the Dreamweaver-
to-Fireworks communication link and how your Web production efforts can benefit from it.
543504 FM.qxd 12/10/03 10:42 PM Page xv
xvi
Dreamweaver MX 2004 Bible
In addition to Dreamweaver, Macromedia is perhaps best known for one other contribution to
Web multimedia: Flash. Chapter 24 explores the possibilities offered by incorporating Flash
and Shockwave movies into Dreamweaver-designed Web pages and includes everything you
need to know about configuring MIME types. You also find step-by-step instructions for build-
ing Shockwave inline controls and playing Shockwave movies in frame-based Web pages, as
well as how to add Flash Buttons, Flash Text, and the new Flash elements.
Chapter 25 covers digital video in its many forms: downloadable AVI files, streaming RealVideo

displays, and panoramic QuickTime movies. Chapter 26 focuses on digital audio, with coverage
of standard WAV and MIDI sound files as well as the newer streaming audio formats like MP3.
Part VI — Enhancing Web Site Management and Workflow
Although Web page design gets all the glory, Web site management pays the bills. In Part VI,
you see how Dreamweaver makes this essential part of any Webmaster’s day easier to handle.
Chapter 27 starts off with a look at the use of Dreamweaver Templates and how they can speed
up production while ensuring a unified look and feel across your Web site. Chapter 28 covers
the Library, which can significantly reduce any Webmaster’s workload by providing reusable—
and updatable — page elements. Chapter 29 describes Dreamweaver’s built-in tools for main-
taining cross- and backward-browser compatibility. A Dreamweaver Technique demonstrates
a browser-checking Web page that automatically directs users to appropriate links.
Until now, individual Web developers have been stymied when attempting to integrate
Dreamweaver into a team development environment. File locking was all too easily subverted,
allowing team members to inadvertently overwrite revisions. Site reports were limited in scope
and output only to HTML, and, worst of all, version control was nonexistent. Dreamweaver
MX 2004 addresses all these concerns while laying a foundation for future connectivity. In
Chapter 30, you see how you can tie Dreamweaver into an existing Visual SourceSafe or
WebDAV version control system. Other new features covered include custom file view
columns and enhanced Design Notes accessibility.
I can’t think of any new technology on the Web that has gained widespread acceptance as
quickly as XML has. In a nutshell, XML (short for Extensible Markup Language) enables you
to create your own custom tags that make the most sense for your business or profession.
Although XML doesn’t enjoy full browser support as of this writing, it’s only a matter of time—
and little time at that. Chapter 31 shows you how to apply this fast-approaching technology of
tomorrow in Dreamweaver today.
Part VII — Extending Dreamweaver
Dreamweaver is a program with immense capabilities for expanding its own power. Chapter 32
explores the brave new world of Dreamweaver extensibility, with complete coverage of using
and building commands as well as custom tags, translators, floaters, and C-level Extensions.
With its own set of objects and behaviors, Dreamweaver complements HTML’s extensibility.

Chapter 33 shows you how you can use the built-in objects to accomplish most of your
Web page layout chores quickly and efficiently. And when you’re ready for increased automa-
tion, the chapter explains how to build your own custom objects. If you’re JavaScript-savvy,
Chapter 34 gives you the material necessary to construct your own client-side behaviors and
reduce your day-to-day workload. Finally, Chapter 35 examines server behaviors, describing
every standard one in detail and then exploring the use of the Server Behavior Builder,
Dreamweaver’s tool for creating custom server behaviors.
543504 FM.qxd 12/10/03 10:42 PM Page xvi
xvii
Preface
Appendix
The appendix describes the contents of the CD-ROM that accompanies this book. Throughout
this book, whenever you encounter a reference to files or programs on the CD-ROM, please
check this appendix for more information.
Conventions Used in This Book
I use the following conventions throughout this book.
Windows and Macintosh conventions
Because Dreamweaver MX 2004 Bible is a cross-platform book, it gives instructions for both
Windows and Macintosh users when keystrokes for a particular task differ. Throughout this
book, the Windows keystrokes are given first; the Macintosh are given second in parentheses,
as follows:
To undo an action, press Ctrl+Z (Command+Z).
The first action instructs Windows users to press the Ctrl and Z keys in combination, and the
second action (in parentheses) instructs Macintosh users to press the Command and Z keys
together.
Key combinations
When you are instructed to press two or more keys simultaneously, each key in the combina-
tion is separated by a plus sign. For example:
Ctrl+Alt+T (Command+Option+T)
The preceding tells you to press the three listed keys for your system at the same time. You

can also hold down one or more keys and then press the final key. Release all the keys at the
same time.
Mouse instructions
When instructed to click an item, move the mouse pointer to the specified item and click the
mouse button once. Windows users use the left mouse button unless otherwise instructed.
Double-click means clicking the mouse button twice in rapid succession.
When instructed to select or choose an item, you may click it once as previously described. If
you are selecting text or multiple objects, click the mouse button once, press Shift, and then
move the mouse to a new location and click again. The color of the selected item or items
inverts to indicate the selection. To clear the selection, click once anywhere on the Web page.
Menu commands
When instructed to select a command from a menu, you see the menu and the command
separated by an arrow symbol. For example, when instructed to execute the Open command
from the File menu, you see the notation File ➪ Open. Some menus use submenus, in which
case you see an arrow for each submenu, as follows: Insert ➪ Form Object ➪ Text Field.
543504 FM.qxd 12/10/03 10:42 PM Page xvii
xviii
Dreamweaver MX 2004 Bible
Typographical conventions
I use italic type for new terms and for emphasis and boldface type for text that you need to
type directly from the computer keyboard.
Code
A special typeface indicates HTML or other code, as demonstrated in the following example:
<html>
<head>
<title>Untitled Document</title>
</head>
<body bgcolor=”#FFFFFF”>
</body>
</html>

This code font is also used within paragraphs to designate HTML tags, attributes, and values
such as
<body>, bgcolor, and #FFFFFF. All HTML tags are presented in lowercase, as written
by Dreamweaver, although browsers are not generally case-sensitive in terms of HTML.
The code continuation character (Æ) at the end of a code line indicates that the line is too
long to fit within the margins of the printed book. You should continue typing the next line of
code before pressing the Enter (Return) key.
Navigating This Book
Various signposts and icons are located throughout Dreamweaver MX 2004 Bible for your
assistance. Each chapter begins with an overview of its information and ends with a quick
summary.
Icons appear in the text to indicate important or especially helpful items. Here’s a list of
the icons and their functions:
Tips provide you with extra knowledge that separates the novice from the pro.
Notes provide additional or critical information and technical data on the current topic.
Sections marked with a New Feature icon detail an innovation introduced in Dreamweaver
MX 2004.
Cross-Reference icons indicate places where you can find more information on a particular
topic.
Cross-
Reference
New
Feature
Note
Tip
543504 FM.qxd 12/10/03 10:42 PM Page xviii
xix
Preface
The Caution icon is your warning of a potential problem or pitfall.
The On the CD-ROM icon indicates that the accompanying CD-ROM contains a related file in

the given folder. See the appendix for more information about where to locate specific items.
Further Information
You can find more help for specific problems and questions by investigating several Web
sites. Macromedia’s own Dreamweaver Web site is the best place to start:
www.macromedia.com/software/Dreamweaver/
I heartily recommend that you visit and participate in the official Dreamweaver newsgroup:
news://forums.macromedia.com/macromedia.Dreamweaver
You can also e-mail me at

I can’t promise instantaneous turnaround, but I answer all my mail to the best of my abilities.
On the
CD-ROM
Caution
543504 FM.qxd 12/10/03 10:42 PM Page xix
543504 FM.qxd 12/10/03 10:42 PM Page xx
Acknowledgments
D
reamweaver continues to grow with each release, and only a team of Web-savvy person-
nel can describe its capabilities with grace and precision. I’m extremely happy and
proud to have had just such a team involved in bringing Dreamweaver MX 2004 Bible to life.
Dan Short did an excellent job handling the increasingly complex dynamic side of Dreamweaver.
I really appreciate all the work he did to bring the various server models to life — not to men-
tion all the additional screen shots he had to take.
Looking for a technical editor par excellence? Well, keep looking, ‘cause I’m hanging onto
mine. Derren Whiteman has made sure the material is on the technical straight-and-narrow
with his wide-ranging expertise and adept juggling of multiple operating systems and configu-
rations. Thanks for all your work, Derren; you’ve really had a significant impact on the book.
Macromedia has been wonderfully supportive of my efforts to bring out the most detailed
Bible possible. I can only imagine the collective groan that goes up when yet another e-mailed
question from me— with a deadline, no less — arrives. Warm thanks and heartfelt apprecia-

tion to Sho Kuwamoto, Alain Dumesney, Lori Hylan Cho, and all the other Dreamweaver engi-
neers and techs who allowed me to pick their brains. I’d also like to single out the Dreamweaver
Technical Support staff, whose answers to users’ queries have been tremendous sources of
information. And who’s that in the back of the room? Macromedia management— in the form
of David Mendels, Beth Davis, David Deming, Susan Morrow, Jennifer Taylor, and others — has
opened many, many doors to me. They should all stand up and take a bow. And, finally, I and
the rest of the Dreamweaver community are beholden to Kevin Lynch and Paul Madar for
their vision and hard work in bringing this dream home.
To me, there’s no higher compliment than to be told that I know my business. Well, the folks I
work with at Wiley sure know their business: Executive Editor Chris Webb, Senior Project
Editor Jodi Jensen, and all the additional support staff. And to someone whose business is to
know my business, a double thank you with a cherry on top for my agent, Laura Belt, of Adler
& Robin Books.
One last note of appreciation: To all the people who took a chance with some of their hard-
earned money and bought the previous editions of this book. That small sound you hear in
the background is me applauding you as thanks for your support. I hope my efforts continue
to be worthy.
543504 FM.qxd 12/10/03 10:42 PM Page xxi
Contents at a Glance
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Part I: Dreamweaver MX 2004 Basics . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1: Introducing Dreamweaver MX 2004 . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2: A Dreamweaver Workflow Example . . . . . . . . . . . . . . . . . . . . . . . . . 35
Chapter 3: Touring Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Chapter 4: Setting Your Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Chapter 5: Setting Up Sites and Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Part II: Web Design and Layout Fundamentals . . . . . . . . . . . . . . . . . 211
Chapter 6: Accessing the Code Directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

Chapter 7: Building Style Sheet Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Chapter 8: Working with Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Chapter 9: Inserting Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Chapter 10: Establishing Web Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Part III: Advanced Design Tools and Techniques . . . . . . . . . . . . . . . . 413
Chapter 11: Working with Divs and Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Chapter 12: Using Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Chapter 13: Setting Up Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Chapter 14: Interactive Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
Chapter 15: Creating Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Chapter 16: Making Client-Side Image Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Chapter 17: Using Frames and Framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
Part IV: Incorporating Dynamic Data . . . . . . . . . . . . . . . . . . . . . . . 637
Chapter 18: Establishing Connections and Recordsets . . . . . . . . . . . . . . . . . . . . . 639
Chapter 19: Making Data Dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Chapter 20: Managing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
Chapter 21: Working with Live Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
Chapter 22: Crafting Multiple-Page Applications . . . . . . . . . . . . . . . . . . . . . . . . 723
543504 FM.qxd 12/10/03 10:42 PM Page xxii

×