Using Dreamweaver MX.pdf

(12360 KB) Pobierz
Using Dreamweaver Ultradev
Using Dreamweaver MX
macromedia
®
642635464.003.png 642635464.004.png 642635464.005.png
Trademarks
Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware,
Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage
Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, Design in Motion, Director, Director Multimedia Studio,
Doc Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks, Flash, Fontographer,
FreeHand, FreeHand Graphics Studio, Generator, Generator Developer’s Studio, Generator Dynamic Graphics Server, Knowledge
Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo & Design, Macromedia Flash,
Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power Applets, Priority Access, Roundtrip
HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote, Shockwave Internet Studio, Showcase, Tools
to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra are trademarks of Macromedia, Inc. and may be
registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or
phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and
may be registered in certain jurisdictions including internationally.
This guide contains links to third-party Web sites that are not under the control of Macromedia, and Macromedia is not responsible for
the content on any linked site. If you access a third-party Web site mentioned in this guide, then you do so at your own risk. Macromedia
provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any
responsibility for the content on those third-party sites.
Apple Disclaimer
APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED
COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY
NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER
RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE.
Copyright © 1997 - 2002 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated,
or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc.
Third Party Software Notices and/or Additional Terms and Conditions can be found at http://www.macromedia.com/go/thirdparty/.
Part Number ZDW60M300
Acknowledgments
Project Management: Sheila McGinn
Writing: Chris Bedford, Kim Diezel, Jed Hartman, Charles Nadeau, Jennifer Rowe
Editing: Mary Ferguson, Mary Kraemer, Lisa Stanziano
Production Management: Patrice O’Neill
Multimedia Design and Production: Aaron Begley, Benjamin Salles, Noah Zilberberg
Print and Help Design and Production: Caroline Branch, John Francis
Illustrations: Chris Basmajian
Web Editing and Production: George Brown, Rebecca Godbois, Jeff Harmon, Jon Varese
Special thanks to Luciano Arruda, Jake Cockrell, Kristin Conradi, George Comninos, David Deming, Tonya Estes, Stephanie Goss,
David Halbakken, Nick Halbakken, Wanda Huang, Narciso (nj) Jaramillo, Craig Jennings, Ken Karleskint, Sho Kuwamoto, David
Lenoe, Jay London, Bonnie Loo, Sam Mathews, Larry McLister, Susan Morrow, Masayo Noda, Dan Radigan, Mike Sundermeyer, Heidi
Bauer Williams, Jorge Taylor, Lawrence Teschmacher, Venu Venugopal, and the entire Dreamweaver engineering and QA teams.
First Edition: June 2002
Macromedia, Inc.
600 Townsend St.
San Francisco, CA 94103
2
CONTENTS
Part I
Dreamweaver Basics
CHAPTER 1
Welcome to Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Learning Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Website creation workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
What’s new in Dreamweaver MX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
HTML and web technologies resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
CHAPTER 2
Exploring the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using the Dreamweaver workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using windows and panels in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Using Dreamweaver with other applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Customizing Dreamweaver: Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
CHAPTER 3
Planning and Setting Up Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
About site planning and design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Setting up a Dreamweaver site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Using the Site Definition Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Setting up a local folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Setting up a remote folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Editing a Dreamweaver site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Editing existing websites in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
CHAPTER 4
Managing Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
About the Site panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
About the site map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Importing and exporting sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Removing a site from your list of sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Using Check In/Check Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3
642635464.006.png
Getting and putting files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Synchronizing the files on your local and remote sites . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Cloaking folders and files in your site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Using Design Notes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Using reports to improve workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
About the Sitespring panel in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Using the Sitespring panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
CHAPTER 5
Setting Up a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Creating Dreamweaver documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Working with the New Document dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Opening existing documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Setting document properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Working with colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Selecting elements in the Document window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Using visual guides in the design process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Viewing and editing head content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
About automating tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Part II
Preparing to Build Dynamic Sites
CHAPTER 6
Setting Up a Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
A note for Dreamweaver UltraDev 4 users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
What you need to build web applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Setting up a web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Setting up an application server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Creating a root folder for the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Defining a Dreamweaver site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Connecting to a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Troubleshooting application server errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
CHAPTER 7
Database Connections for
ColdFusion Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Connecting to a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Editing or deleting a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Connecting using UltraDev 4 connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
CHAPTER 8
Database Connections for
ASP.NET Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Connecting to a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Editing or deleting a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
4
Contents
642635464.001.png
CHAPTER 9
Database Connections for ASP Developers . . . . . . . . . . . . . . . . . . . . . . . . . 151
Understanding ASP database connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Creating a DSN connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Creating a DSN-less connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Connecting to a database on an ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Editing or deleting a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
CHAPTER 10
Database Connections for JSP Developers . . . . . . . . . . . . . . . . . . . . . . . . . 165
Understanding JSP connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Connecting to a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Connecting through an ODBC driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Editing or deleting a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
CHAPTER 11
Database Connections for PHP Developers . . . . . . . . . . . . . . . . . . . . . . . . . 171
Connecting to a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Editing or deleting a database connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Part III
Working with Page Code
CHAPTER 12
Setting Up Your Coding Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Viewing your code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Setting viewing preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Setting coding preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Customizing keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Opening files in Code view by default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Setting Validator preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Managing tag libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Importing custom tags into Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Using an external HTML editor with Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . 187
CHAPTER 13
Coding in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
About the Dreamweaver coding environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Writing and editing code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Searching and replacing tags and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Accessing language references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
CHAPTER 14
Optimizing and Debugging Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Cleaning up your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Verifying that tags and braces are balanced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Validating your tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Contents
5
642635464.002.png
Zgłoś jeśli naruszono regulamin