Creating Web Pages ALL-IN-ONE DESK REFERENCE FOR DUMmIES ‰ 2ND EDITION by Emily Vander Veer, Doug Lowe, Eric Ray, Deborah Ray, Damon Dean, Camille McCue, Emily Weadock, Joyce Nielsen, Mariva Aviram, Stephen Lockwood, and Madhu Siddalingaiah Creating Web Pages ALL-IN-ONE DESK REFERENCE FOR DUMmIES ‰ 2ND EDITION by Emily Vander Veer, Doug Lowe, Eric Ray, Deborah Ray, Damon Dean, Camille McCue, Emily Weadock, Joyce Nielsen, Mariva Aviram, Stephen Lockwood, and Madhu Siddalingaiah Creating Web Pages All-in-One Desk Reference For Dummies®, 2nd Edition Published by Wiley Publishing, Inc 111 River Street Hoboken, NJ 07030-5774 Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada 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) 646-8600 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: permcoordinator@wiley.com Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, 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 Copyright © 1997-2003 Macromedia, Inc 600 Townsend Street, San Francisco, CA 94103 USA All Rights Reserved Macromedia and Dreamweaver are trademarks or registered trademarks of Macromedia, Inc in the United States and/or other countries.Copyright © 2002-2003 Macromedia, Inc 600 Townsend Street, San Francisco, CA 94103 USA All Rights Reserved Macromedia and Contribute are trademarks or registered trademarks of Macromedia, Inc in the United States and/or other countries Copyright © 1996-2003 Macromedia, Inc 600 Townsend Street, San Francisco, CA 94103 USA All Rights Reserved Macromedia and Flash 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 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 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 Library of Congress Control Number: 2003115749 ISBN: 0-7645-4345-8 Manufactured in the United States of America 10 2B/RW/QR/QU/IN is a trademark of Wiley Publishing, Inc Wiley Publishing, Inc gratefully acknowledges the contributions of these authors and contributors: Emily Vander Veer, Doug Lowe, Eric Ray, Deborah Ray, Damon Dean, Camille McCue, Emily Weadock, Joyce Neilsen, Marivia Aviram, Stephen Lockwood, and Madhu Siddalingaiah Publisher’s Acknowledgments We’re proud of this book; please send us your comments through our online registration form located at www.dummies.com/register/ Some of the people who helped bring this book to market include the following: Acquisitions, Editorial, and Media Development Production Associate Project Editor: Rebecca Huehls Senior Acquisitions Editor: Steve Hayes Copy Editors: Kelly Ewing, Rebecca Senninger Technical Editor: Dennis Short Editorial Managers: Leah Cameron, Carol Sheehan Senior Permissions Editor: Carmen Krikorian Project Coordinator: Courtney MacIntyre Layout and Graphics: Seth Conley, Stephanie D Jumper, Jacque Schneider, Julie Trippetti, Melanee Wolven Proofreaders: Andy Hollandbeck, Carl Pierce, Dwight Ramsey, Charles Spencer, Brian Walls Indexer: Betty Kish Special Help: Becky Whitney Media Development Specialist: Greg Stafford Media Development Manager: Laura VanWinkle Media Development Supervisor: Richard Graves Editorial Assistant: Amanda Foxworth Cartoons: Rich Tennant (www.the5thwave.com) Publishing and Editorial for Technology Dummies Richard Swadley, Vice President and Executive Group Publisher Andy Cummings, Vice President and Publisher Mary C Corder, Editorial Director Publishing for Consumer Dummies Diane Graves Steele, Vice President and Publisher Joyce Pepple, Acquisitions Director Composition Services Gerry Fahey, Vice President of Production Services Debbie Stailey, Director of Composition Services Contents at a Glance Introduction Book I: Web Page Basics .9 Chapter 1: Creating a Successful Web Site 11 Chapter 2: Building Your First Web Site .27 Chapter 3: Exploring the Essential Elements of Web Page Design 41 Chapter 4: Working with Graphics, Sounds, and Video 65 Chapter 5: Building Your Web Workshop .79 Chapter 6: Publishing Your Web Site 87 Chapter 7: Publicizing Your Web Site 97 Book II: HTML 105 Chapter 1: Creating an HTML Page .107 Chapter 2: Setting Background and Text Characteristics 117 Chapter 3: Adding Internal and External Links 127 Chapter 4: Working with Images 137 Chapter 5: Controlling Page Layout .147 Chapter 6: Creating Forms 155 Chapter 7: Working with Frames 167 Chapter 8: Developing Style Sheets 179 Book III: FrontPage 2003 193 Chapter 1: Getting to Know FrontPage .195 Chapter 2: Getting Started with FrontPage: Your First Web Site .201 Chapter 3: Customizing FrontPage to Your Liking 211 Chapter 4: Laying the Groundwork for Your Web Pages 221 Chapter 5: Getting the Basics on Your Page: Text, Tables, and Links .229 Chapter 6: Perking Up Your Pages with Interactive Buttons, Counters, and More 243 Chapter 7: Image Editing for Everyone .251 Chapter 8: Publishing Your Web Pages .261 Book IV: Dreamweaver 267 Chapter 1: Getting to Know Dreamweaver 269 Chapter 2: Creating Your First Web Site with Dreamweaver 279 Chapter 3: Creating Basic Web Pages 287 Chapter 4: Incorporating Interactive Images .305 Chapter 5: Adding Multimedia Objects 317 Chapter 6: Punching Up Your Pages with Forms and Frames 323 Chapter 7: Laying Out Pages with Layers 337 Chapter 8: Using Templates for a Consistent Look 347 Chapter 9: Publishing and Maintaining Your Site 353 Book V: Multimedia: Pulling Together Graphics, Sound, Video, Animations, and Applets 365 Chapter 1: Adding Visual Appeal with Graphics and Photos 367 Chapter 2: Creating Media Files and Putting Them on Your Site 385 Chapter 3: Spicing Up Your Site with Java Applets 405 Book VI: JavaScript 419 Chapter 1: JavaScript Syntax and Keywords .421 Chapter 2: Basic JavaScript Constructs .431 Chapter 3: Working with the Document Object Model .443 Chapter 4: Exploring Built-In Data Types 465 Chapter 5: Defining and Using Functions 471 Chapter 6: Adding Interactivity with Event Handlers .477 Chapter 7: Working with Forms 481 Chapter 8: More Cool Things You Can Do with JavaScript 491 Book VII: Flash .503 Chapter 1: Getting to Know Flash 505 Chapter 2: Getting Acquainted with the Tools Window 521 Chapter 3: Using Layers 539 Chapter 4: Creating Reusable Symbols .551 Chapter 5: Making Movies 563 Chapter 6: Optimizing Movies .579 Chapter 7: Publishing and Printing Your Movie 587 Chapter 8: Using Flash with Other Programs 595 Book VIII: Adding E-Commerce Capability 601 Chapter 1: Getting to Know E-Commerce 603 Chapter 2: Simplified E-Commerce Solutions 615 Chapter 3: Hosted E-Commerce Solutions 631 Chapter 4: Create-Your-Own E-Commerce Solutions 639 Chapter 5: Online Marketing: The Key to a Successful E-Commerce Site .649 Book IX: XML 665 Chapter 1: Getting to Know XML 667 Chapter 2: The XML Specification 677 Chapter 3: Designing a DTD 689 Chapter 4: Logical Structures 699 Chapter 5: Physical Structures 713 Chapter 6: Converting, Publishing, and Serving XML .731 Appendix: About the CD 737 Index 745 End-User License Agreement 785 Table of Contents Introduction About This Book .2 How to Use This Book .2 Who Are You? How This Book Is Organized Book I: Web Page Basics Book II: HTML Book III: FrontPage 2003 Book IV: Dreamweaver Book V: Multimedia: Pulling Together Graphics, Sound, Video, Animations, and Applets Book VI: JavaScript .5 Book VII: Flash Book VIII: Adding E-Commerce Capability Book IX: XML What’s on the CD? Icon Alert! Book I: Web Page Basics .9 Chapter 1: Creating a Successful Web Site 11 Web Site Basics .11 Different kinds of Web sites 11 Creating a Web site: An overview .13 Planning Your Web Site 13 Creating Your Web Pages 14 From scratch, using a text editor .14 Using a graphical Web page editor 14 Beyond HTML: Adding nifty features .14 Publishing Your Web Pages 15 Finding space for your Web site 15 Publicizing your Web site 16 Elements of a Successful Web Site .17 Organizing Site Content .18 Sequential organization .18 Hierarchical organization 19 Combination sequential and hierarchical organization 20 Web organization 20 x Creating Web Pages All-in-One Desk Reference For Dummies What to Include on Every Page 21 What to Include on Every Web Site 22 Home page 22 Cover page 23 Site map 24 Contact information .24 Help page .24 FAQ 24 Related links 25 Discussion group 25 Chapter 2: Building Your First Web Site 27 Registering with a Free Web Host 27 Using a Free Web Site Creation Tool 29 Viewing Your First Web Page — Live 38 Chapter 3: Exploring the Essential Elements of Web Page Design 41 HTML Basics 41 Adding Text 42 Aligning text 43 Specifying headings .43 Changing text appearance 44 Changing fonts 45 Creating line breaks .46 Adding Color 47 Changing the Background .48 Setting the background color .48 Using a background image 49 Creating Visual Interest with Horizontal Rules 49 Organizing Information into Lists 50 Bulleted lists 50 Numbered lists 51 Creating Links 52 Using text links .53 Using graphic links .53 Linking within the same page .54 Using Tables 54 Creating a basic table 54 Using a table for page layout 56 Creating Navigation Bars .59 Deciding what to include in a navigation bar 60 Creating a text-based navigation bar 60 Using images in a navigation bar 62 Introducing Frames 62 Table of Contents xi Chapter 4: Working with Graphics, Sounds, and Video 65 Getting Familiar with File Formats for Image, Sound, and Video 65 Image file 65 Sound file formats 67 Video file formats 67 Inserting a Graphic Image .68 Working with Graphic Images .68 Carving Up Graphics with Image Maps .69 Using Transparent GIF Images 73 Incorporating Sounds 75 Inserting a link to a sound file 75 Embedding a sound file .76 Creating a background sound 76 Incorporating Video Clips .76 Inserting a link to a video 77 Embedding a video .77 Chapter 5: Building Your Web Workshop 79 Web Browsers 79 Netscape 7.0 79 Internet Explorer .80 Graphics Programs 80 Photoshop .81 CorelDRAW 81 Paint Shop Pro 81 Windows Paint 82 HTML Editors 82 Dreamweaver 82 Composer 83 FrontPage 2003 83 HotDog Professional 83 Java and Animation Tools .83 JBuilder 84 Flash .84 Office Suites 84 Corel WordPerfect Office 11 84 Lotus SmartSuite Millennium Edition 85 Microsoft Office 85 Chapter 6: Publishing Your Web Site 87 Publishing Your Web Pages 87 FTP 88 Web Publishing Wizard 91 Rating Your Site 94 Submitting Your Site to Search Services .96 xii Creating Web Pages All-in-One Desk Reference For Dummies Chapter 7: Publicizing Your Web Site 97 Springing For a Domain Name 97 Choosing a domain name 98 Registering a domain name .98 Understanding Search Services 99 Specifying a descriptive HTML title 100 Optimizing Web page text 100 Using HTML meta tags .101 Exploring automated submission tools 101 Going Beyond Search Services 101 Getting links 102 Advertising your site 102 Using site statistics 103 Book II: HTML 105 Chapter 1: Creating an HTML Page 107 Understanding HTML Basics: Text and Tags 107 Formatting text 108 Nesting tags .109 Using HTML Structure Tags 109 The !DOCTYPE tag 110 The tag 110 The and tags 111 The tag 111 The tag 112 Getting Familiar with Basic HTML Tags 113 Making headings .113 Making paragraphs 113 Emphasizing text 113 Making lists 114 Chapter 2: Setting Background and Text Characteristics 117 Applying a Color Background 117 Applying an Image Background 118 Finding Images to Use 119 Setting Document Text Colors 120 Changing text colors 120 Changing link colors 120 Specifying Text Alignment 121 Using Font Type Specifications 123 Table of Contents xiii Chapter 3: Adding Internal and External Links 127 Understanding Links 127 About URLs 128 Anatomy of URLs 128 Absolute and relative URLs .129 Understanding Anchors 131 Making Links 131 Linking to documents within your site 131 Linking to pages out on the Web 132 Linking to other stuff on the Internet 133 Making Links within Documents 134 Making internal links 134 Marking internal targets 135 Using a Link-Checker Utility 136 Chapter 4: Working with Images 137 Adding Images 137 Optimizing Images for Quick Download 141 Controlling Image Alignment 142 Surrounding Images with Blank Space 143 Making Clickable Images .144 Chapter 5: Controlling Page Layout 147 Developing Tables .147 Embedding Horizontal Rules .150 Forcing Line Breaks .152 Chapter 6: Creating Forms 155 Creating a Basic Form 155 Using Form Components to Collect Information .158 Including Submit and Reset buttons 158 Including check boxes, radio buttons, and more 159 Making check boxes 159 Making radio buttons .161 Using other input types .162 Including select lists 162 Including text areas 164 Chapter 7: Working with Frames 167 About Frames .167 Developing Content .170 Developing Alternative Content 170 Establishing the Frameset Document 171 Setting Up the Frames 173 Setting Up Links and Targets 175 Testing Your Framed Site 176 xiv Creating Web Pages All-in-One Desk Reference For Dummies Chapter 8: Developing Style Sheets 179 About Style Sheets .179 Accommodating browser differences 179 Understanding inheritance .180 Connecting Style Sheets to HTML Documents .181 Embedding style sheets 182 Linking style sheets 183 Understanding Style Rules 184 Applying style rules 186 Setting a font for an entire document 186 Specifying text and background colors 187 Specifying background images 189 Book III: FrontPage 2003 193 Chapter 1: Getting to Know FrontPage 195 “What Is FrontPage, and What Can I Do with It?” 195 How FrontPage Is Organized .195 Viewing Your Web Site 196 Introducing the FrontPage Editor 200 Chapter 2: Getting Started with FrontPage: Your First Web Site 201 Creating a New Web Site 201 Creating Web Pages 204 Creating an empty Web page 204 Creating a Web page from a template 204 Creating framed Web pages 206 Changing a Filename 207 Saving Your Web Pages 208 Opening Files from Other Programs with FrontPage .209 Chapter 3: Customizing FrontPage to Your Liking 211 A Quick Guide to the Three Modes of the FrontPage Editor 211 Using FrontPage Toolbars 213 Creating Folders 214 Deleting Files and Folders 215 Importing Webs and Web Pages 216 Importing files that you created elsewhere 217 Importing folders that you created elsewhere .217 Importing a Web site that you created elsewhere 218 Chapter 4: Laying the Groundwork for Your Web Pages 221 Applying a Theme to a Web Page (Or an Entire Web Site) .221 Editing a Theme 223 Table of Contents xv Editing Page Properties .224 Setting a background image 225 Setting background colors 226 Setting page margins 227 Chapter 5: Getting the Basics on Your Page: Text, Tables, and Links 229 Changing Text Attributes 229 Changing font properties 230 Changing paragraph settings 231 Creating bulleted and numbered lists .232 Changing borders and shading properties .232 Working with Tables 233 Creating a new table 234 Modifying tables 237 Creating and Using Hyperlinks 238 Working with the Hyperlinks view 241 Recalculating a project’s hyperlinks 241 Chapter 6: Perking Up Your Pages with Interactive Buttons, Counters, and More 243 Inserting Some Extra Effects .243 Adding a hit counter 243 Adding an interactive button (rollover) 245 Adding a marquee 246 Adding Graphics to Web Pages 247 Adding a graphic on your own 248 Adding clip art from the Clip Organizer to a Web page .249 Chapter 7: Image Editing for Everyone 251 Activating the Pictures Toolbar 251 Image Manipulation Made Easy 252 Scaling an image 252 Changing brightness and contrast 253 Setting an image’s transparent color .254 Beveling an image .254 Cropping an image .255 Flipping and rotating images 256 Placing text over an image 257 Adding a hyperlink to an image 258 Creating Image Maps 259 Chapter 8: Publishing Your Web Pages 261 Publishing a Web by Using HTTP .261 Publishing a Web by Using FTP 263 Setting up an FTP connection 263 Publishing your Web 264 xvi Creating Web Pages All-in-One Desk Reference For Dummies Book IV: Dreamweaver .267 Chapter 1: Getting to Know Dreamweaver 269 What Is Dreamweaver, and What Can I Do with It? 269 Introducing the Document Window 270 Examining Your Site with the Site Window .271 Choosing between Standard, Layout, and Expanded Tables Modes 273 Exploring Toolbar Buttons 274 Using Panels, Bars, and Properties Inspectors 275 Panels and bars 275 Properties inspectors 276 Getting Help 277 Chapter 2: Creating Your First Web Site with Dreamweaver 279 Starting Dreamweaver 279 Creating a New Site 279 Creating a New Document 283 Adding Content to a Document 283 Saving a Document .285 Previewing a Document in a Web Browser .285 Chapter 3: Creating Basic Web Pages 287 Customizing What You See in the Document Window 287 Turning rulers on and off 287 Moving and resetting the origin .288 Changing ruler measurement units 288 Viewing the grid 288 Activating and deactivating grid snapping .288 Establishing Page Properties 289 Entering Text .293 Inserting text .293 Inserting a line break 293 Deleting text and line breaks 293 Modifying text .294 Manipulating Images 295 Inserting an image 296 Deleting an image .297 Modifying an image 297 Working with Links .300 Inserting a link 300 Deleting a link .300 Using named anchors 301 Working with Tables 302 Inserting a table 302 Deleting a table 303 Table of Contents xvii Storing Information in Table Cells 303 Adding an image to a cell 303 Adding text to a cell 304 Deleting an image from a cell 304 Deleting text from a cell 304 Chapter 4: Incorporating Interactive Images 305 Creating a Link from an Image 305 Creating Clickable Hot Spots 306 Creating a hot spot 306 Modifying a hot spot 308 Adding Text Rollovers (Flash Text) 308 Adding Flash text 308 Changing Flash text 310 Playing (previewing) Flash text 310 Adding Button Rollovers (Flash Buttons) .310 Adding a Flash button 310 Changing a Flash button 312 Modifying Flash button features .312 Playing (previewing) a Flash button 312 Inserting Image Rollovers 312 Setting Up a Navigation Bar 314 Creating a new navigation bar 314 Modifying a navigation bar .316 Chapter 5: Adding Multimedia Objects 317 Adding Audio and Video to Your Pages 317 Embedding an audio or video clip 318 Linking to an audio or video clip 320 Adding Other Media 320 Chapter 6: Punching Up Your Pages with Forms and Frames 323 Incorporating Forms 323 Adding a form .324 Specifying form properties 324 Labeling form objects 325 Using text fields 326 Setting up buttons 327 Adding form elements 328 Structuring Pages with Frames 329 Adding frames 329 Modifying frames 330 Deleting frames 332 Saving frames 332 Saving framesets .333 Setting no-frames content 333 Targeting content .334 xviii Creating Web Pages All-in-One Desk Reference For Dummies Chapter 7: Laying Out Pages with Layers 337 Adding a Layer 337 Selecting a Layer 338 Deleting a Layer 338 Placing Objects in a Layer 338 Including a Background Image or Color in a Layer 339 Naming a Layer 339 Nesting Layers 340 Enabling nesting 340 Creating a new nested layer 341 Changing the nesting of an existing layer .341 Collapsing or expanding your view in the Layers panel .341 Aligning Layers .342 Changing the Visibility of a Layer 343 Layering Layers: Setting the Z-index 343 Moving a Layer .345 Resizing a Layer 346 Resizing Multiple Layers at the Same Time 346 Chapter 8: Using Templates for a Consistent Look 347 About Templates 347 Creating and Using Templates 348 Creating a template 349 Adding an editable region 349 Using a Template to Create a Web Page 351 Chapter 9: Publishing and Maintaining Your Site 353 Defining Remote Host Settings 353 Connecting to a Web Server .356 Transferring Files 358 Collaborating on Site Revisions 358 Enabling file check in/check out .359 Checking files in and out 359 Maintaining Your Site 360 Measuring download time .360 Monitoring links 361 Setting up meta tags 363 Book V: Multimedia: Pulling Together Graphics, Sound, Video, Animations, and Applets .365 Chapter 1: Adding Visual Appeal with Graphics and Photos 367 Acquiring Web-Friendly Graphics and Photos 367 Optimizing Your Images for the Web 368 Saving your images in a Web-friendly format 369 Reducing image file size 369 Choosing Web-friendly image colors .370 Table of Contents xix Creating Transparent Images 372 Creating Clickable Images 374 Adding the image 375 Mapping clickable areas 377 Defining the map 380 Chapter 2: Creating Media Files and Putting Them on Your Site 385 The Difference between Downloadable and Streaming Media .385 Creating Streaming Audio Files 387 Creating Downloadable Audio Files 391 Creating Video Files for Your Web Pages 393 Gathering the hardware and software you need 394 Converting a video file to RealVideo format 395 Creating an Animated Effect .396 Editing your animated effect 401 Optimizing your animated effect 402 Finding Media Files 402 Adding Media Files to Your Web Page .403 Adding a link to a media file 403 Embedding a media file .404 Chapter 3: Spicing Up Your Site with Java Applets 405 Finding Applets 406 Inserting Applets into HTML: An Overview 406 Inserting Applets with the Tag 406 Looking at the tag syntax .407 Placing an applet on a page using the tag 410 Inserting Applets with the Tag 410 Looking at the tag syntax .411 Placing an applet on a page using the tag 413 Understanding Applet Security 414 Creating Your Own Java Applets 415 What you need to create Java applets 415 From source to executable code: A look at the applet development life cycle 417 Book VI: JavaScript 419 Chapter 1: JavaScript Syntax and Keywords 421 A Quick Overview of the JavaScript Scripting Language 421 Adding Scripts to HTML Files .422 About JavaScript Security 422 Document Object Model Basics 424 The document object model 424 Built-in JavaScript data types 426 Utility objects 426 xx Creating Web Pages All-in-One Desk Reference For Dummies Basic Punctuation and Syntax 427 Top-down execution 428 Spelling and capitalization (case) 428 Pairs .428 Nested quotes .429 Chapter 2: Basic JavaScript Constructs 431 Documenting Your Script with Comments 431 Creating Variables to Hold Temporary Values 432 Declaring a variable 432 Assigning values to a variable 432 Accessing a variable 433 Understanding variable scope 433 Testing Conditional Expressions: if else 434 Constructing Loops .435 for 435 while 436 break 437 continue .437 Getting Familiar with JavaScript Operators .438 Assignment operators .438 Comparison operators .438 Logical operators .439 Mathematical operators 439 String operators 440 Unary operators 440 Operator precedence .441 Chapter 3: Working with the Document Object Model 443 Accessing Object Properties 444 Accessing Object Methods 445 anchor 445 applet 446 area 446 button 447 checkbox .447 document 448 fileUpload 449 form 450 frame 450 hidden 451 history 451 image 452 link 453 location 454 Math .455 navigator .456 password .456 Table of Contents xxi radio .457 reset .459 select 459 submit 461 text 461 textarea 462 window 463 Chapter 4: Exploring Built-In Data Types 465 Array 465 Date 466 Invoking Date Methods 467 String 468 Chapter 5: Defining and Using Functions 471 About Using Functions 471 Calling a function 471 Defining a function .472 Returning values .473 Taking Advantage of Built-In Functions 473 Using Functions to Create Custom Objects 474 Chapter 6: Adding Interactivity with Event Handlers 477 Calling Event Handlers 477 Examining the Event Handlers Supported by JavaScript .478 Chapter 7: Working with Forms 481 Data Validation Basics 481 Field-Level Validation 482 Ensuring that a value exists 482 Ensuring that a value is numeric 484 Ensuring that a value matches a pattern 486 Form-Level Validation 488 Chapter 8: More Cool Things You Can Do with JavaScript 491 Hiding Scripts from Non-JavaScript-Enabled Browsers 491 Generating Pop-Up Messages .492 Attaching Scripts to Clickable HTML Elements .493 Displaying a Formatted Date 493 Reusing Scripts with js Files 494 Creating Additional Browser Windows .495 Creating Automatically Scrolling Text .496 Detecting the Browser Version and Plug-Ins 497 Detecting the browser version 497 Detecting browser plug-ins .500 Customizing Web Pages Based on User Input 501 xxii Creating Web Pages All-in-One Desk Reference For Dummies Book VII: Flash 503 Chapter 1: Getting to Know Flash 505 Understanding the Moviemaking Process 505 Starting Flash 507 Working with Movie Files 507 Opening a Flash movie file 508 Importing a non-Flash file 508 Saving a movie file 508 Tailoring Your Work Environment with Panels 509 Displaying panels .509 Closing panels 510 Grouping panels 511 Setting Flash Preferences 511 Setting General preferences 511 Setting Editing preferences .513 Setting Clipboard preferences 514 Setting Warnings preferences 515 Setting ActionScript preferences 516 Streamlining Your Work with Keyboard Shortcuts 517 Getting Help 519 Chapter 2: Getting Acquainted with the Tools Window 521 Locating and Using Drawing Tools 521 Arrow Tool 523 Brush Tool 524 Dropper Tool .525 Eraser Tool 526 Fill Transform Tool .528 Free Transform Tool 528 Ink Bottle Tool 530 Lasso Tool .530 Line Tool 531 Oval Tool .532 Paint Bucket Tool 532 Pen Tool .534 Pencil Tool 534 Rectangle Tool 535 Subselect Tool 537 Text Tool 537 Chapter 3: Using Layers 539 Getting Familiar with Layers .539 Creating Layers 541 Working with Layers 542 Selecting a layer 542 Selecting two or more layers 542 .. .Creating Web Pages ALL-IN-ONE DESK REFERENCE FOR DUMmIES ‰ 2ND EDITION by Emily Vander Veer, Doug Lowe, Eric Ray, Deborah Ray,... Nielsen, Mariva Aviram, Stephen Lockwood, and Madhu Siddalingaiah Creating Web Pages ALL-IN-ONE DESK REFERENCE FOR DUMmIES ‰ 2ND EDITION by Emily Vander Veer, Doug Lowe, Eric Ray, Deborah Ray,... Nielsen, Mariva Aviram, Stephen Lockwood, and Madhu Siddalingaiah Creating Web Pages All-in-One Desk Reference For Dummies®, 2nd Edition Published by Wiley Publishing, Inc 111 River Street Hoboken,