Essays /

Not Yet Essay

Essay preview

THE EXPERT’S VOICE ® IN WEB DEVELOPMENT

Beginning

JavaScript with DOM Scripting and Ajax
From Novice to Professional
The ultimate guide to modern JavaScript development!

Christian Heilmann
Foreword by Simon Willison, Technology Development at Yahoo!

Beginning JavaScript with DOM Scripting and Ajax
From Novice to Professional

■■■

Christian Heilmann

Beginning JavaScript with DOM Scripting and Ajax: From Novice to Professional Copyright © 2006 by Christian Heilmann All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-680-7 ISBN-10 (pbk): 1-59059-680-3 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editors: Charles Brown, Chris Mills Technical Reviewer: Jon Stephens Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Keir Thomas, Matt Wade Project Manager: Beth Christmas Copy Edit Manager: Nicole LeClerc Copy Editor: Ami Knox Assistant Production Director: Kari Brooks-Copony Production Editor: Katie Stence Compositor: Pat Christenson Proofreader: Lori Bring Indexer: Broccoli Information Management Artist: April Milne Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.beginningjavascript.com and http:// www.apress.com.

To Ioanna, who can sleep and look like an angel while some geek next to her hacks on the keyboard of a laptop and constantly mutters “Why won’t you work” under his breath.

Contents at a Glance
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

■CHAPTER 1 ■CHAPTER 2 ■CHAPTER 3 ■CHAPTER 4 ■CHAPTER 5 ■CHAPTER 6 ■CHAPTER 7 ■CHAPTER 8 ■CHAPTER 9 ■CHAPTER 10 ■CHAPTER 11 ■APPENDIX

Getting Started with JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Data and Decisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 From DHTML to DOM Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 HTML and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Presentation and Behavior (CSS and Event Handling) . . . . . . . . . . 123 Common Uses of JavaScript: Images and Windows . . . . . . . . . . . 183 JavaScript and User Interaction: Navigation and Forms . . . . . . . . . . 241 Back-End Interaction with Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Data Validation Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Modern JavaScript Case Study: A Dynamic Gallery . . . . . . . . . . . . 387 Using Third-Party JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Debugging JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471

v

Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

■CHAPTER 1

Getting Started with JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

The Why of JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 What Is JavaScript? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Problems and Merits of JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Why Use JavaScript If It Cannot Be Relied On? . . . . . . . . . . . . . . . . . . . . . . . 6 JavaScript in a Web Page and Essential Syntax . . . . . . . . . . . . . . . . . . . . . . 7 JavaScript Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Code Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 An Aside About Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Simple JavaScript Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

■CHAPTER 2

Data and Decisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data, Data Types, and Data Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The String Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . JavaScript Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Converting Different Types of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . The Composite Data Types: Array and Object . . . . . . . . . . . . . . . . . . . . . . . Objects JavaScript Supplies You with: String, Date, and Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Array Object’s Methods and Properties . . . . . . . . . . . . . . . . . .

17 18 18 21 23 26 30 30 39 42

vii

viii

■C O N T E N T S

Making Decisions in JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Logical and Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing Multiple Values: the switch Statement . . . . . . . . . . . . . . . . Repeating Things: Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45 45 49 52 54 59

■CHAPTER 3

From DHTML to DOM Scripting

. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 63 65 68 69 71 71 72 74 76 79 80 80 81 83 85

JavaScript As “the Behavior Layer” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Object Detection vs. Browser Dependence . . . . . . . . . . . . . . . . . . . . Progressive Enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . JavaScript and Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Good Coding Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Commenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Short Code via Ternary Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sorting and Reuse of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variable and Function Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Keeping Scripts Safe with the Object Literal . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

■CHAPTER 4

HTML and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Anatomy of an HTML Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Providing Feedback in Web Pages via JavaScript: The Old School Ways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Using window Methods: prompt(), alert(), and confirm() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Accessing the Document via the DOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Of Children, Parents, Siblings, and Values . . . . . . . . . . . . . . . . . . . . . . . . . . 99 From the Parents to the Children . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 From the Children to the Parents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Among Siblings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Changing Attributes of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

■C O N T E N T S

ix

Creating, Removing, and Replacing Elements . . . . . . . . . . . . . . . . . . . . . . Avoiding NOSCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shortening Your Scripts via InnerHTML. . . . . . . . . . . . . . . . . . . . . . . DOM Summary: Your Cheat Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . DOMhelp: Our Own Helper Library . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109 113 115 116 118 122

■CHAPTER 5

Presentation and Behavior (CSS and Event Handling)

. . 123 123 131 153 156 165 172 173 174 179 180

Changing the Presentation Layer via JavaScript . . . . . . . . . . . . . . . . . . . . Helping the CSS Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the Document’s Behavior via Event Handling . . . . . . . . . . . . . Events in the W3C-Compliant World . . . . . . . . . . . . . . . . . . . . . . . . . Fixing Events for the Non-W3C-Compliant World . . . . . . . . . . . . . . Never Stop Optimizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Ugly Page Load Problem and Its Ugly Solutions . . . . . . . . . . . . Reading and Filtering Keyboard Entries . . . . . . . . . . . . . . . . . . . . . . The Dangers of Event Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

■CHAPTER 6

Common Uses of JavaScript: Images and Windows

. . . . 183 183 184 186 187 196 211 212 213 215 238 239

Images and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basics of Image Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preloading Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rollover Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Slide Shows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Images and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . Windows and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Window Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Window Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary: Windows and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

x

■C O N T E N T S

■CHAPTER 7

JavaScript and User Interaction: Navigation and Forms. . .
Navigation and JavaScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Fear of the Page Reload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basics of Navigation and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . Browser Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . In-Page Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Site Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pagination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Navigation with JavaScript . . . . . . . . . . . . . . . . . . . . . . Forms and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basics of Forms with JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interactive Forms: Hiding and Showing Dependent Elements. . . . Custom Form Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Forms and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

241 241 242 242 245 246 255 263 272 272 274 275 291 297 297 297

■CHAPTER 8

Back-End Interaction with Ajax

. . . . . . . . . . . . . . . . . . . . . . . . . . 299

Household Cleaning Liquid, Football Club, or Flash Gordon’s Spacecraft: What Is Ajax? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Et Tu, Cache? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Putting the X Back into Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Replacing XML with JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Server-Side Scripts to Reach Third-Party Content . . . . . . . . XHR on Slow Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Larger Ajax Example: Connected Select Boxes . . . . . . . . . . . . . . Optional Dynamic Ajax Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

300 309 309 314 316 320 323 331 340 343

■CHAPTER 9

Data Validation Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Pros and Cons of Client-Side JavaScript Validation . . . . . . . . . . . . . . . . . 343 A Quick Reminder About Protecting Content with JavaScript . . . . . . . . . 344 The One-Size-Fits-All Validation Myth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

■C O N T E N T S

xi

Basic JavaScript Validation with String and Numeric Methods . . . . . . . String Validation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numeric Validation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Syntax and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wildcard Searches, Constraining Scope, and Alternatives . . . . . . Restricting the Number of Characters with Quantifiers . . . . . . . . . Word Boundaries, Whitespace, and Other Shortcuts . . . . . . . . . . . Methods Using Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . The Power of Parenthesis Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . Regular Expression Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Validation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form Validation Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Designating Mandatory Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Hidden Field Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Indicator Element Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The CSS Classes Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Custom Attribute Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Failures of These Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sharing Validation Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Giving Users Validation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Showing a List of Erroneous Fields . . . . . . . . . . . . . . . . . . . . . . . . . . Replacing the Main Form with a Clickable Error Message. . . . . . . Highlighting Erroneous Fields Individually . . . . . . . . . . . . . . . . . . . . Instant Validation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Dynamic Validation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

346 346 352 357 357 358 359 360 361 361 363 363 364 364 364 365 366 366 367 367 369 369 374 376 379 381 385 387 387 388 388 389 396 401 406 414

■CHAPTER 10

Modern JavaScript Case Study: A Dynamic Gallery . . . . .
Basics of Thumbnail Galleries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What Is a Thumbnail Gallery and What Should It Do? . . . . . . . . . . . . . . . Static Thumbnail Galleries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Faking Dynamic Galleries with JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic Thumbnail Galleries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating an Image Badge from a Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xii

■C O N T E N T S

■CHAPTER 11

Using Third-Party JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What the Web Offers You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Snippets, RSS Feeds, APIs, and Libraries . . . . . . . . . . . . . . . . . . . . RSS Feeds and REST APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples of REST APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using a Library: Short, Shorter, jQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dangers of jQuery and Other Libraries Using Their Own Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using an API: Adding a Map to Your Site with Google Maps . . . . . . . . . . Full Service: The Yahoo Developer Network and User Interface Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bouncy Headlines Using YUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Replacing Pop-Up Windows Using the YUI Connection Manager and Container Components . . . . . . . . . . . . . . . . . . . . . . Yahoo User Interface Library Summary . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

415 415 416 417 418 419 426 427 438 439 444 449 450 451 451 451 452 454 456 458 458 459 462 463 463 464 466 466 470 ...

Read more

Keywords

+1 -1 -10 -13 -2 -23 -23.75 -24 -3 -348 -4505 -549 -59059 -5930 -5939 -680 -7 -800 /action/dstf/ /days/ /docs/web-developer/). /en/docs/javascript /faq/ /forum/ /jonathan/ /mailman/listinfo/thelist 0 0.75 0.872 00 1 1.5.0.3 10 100 1000 10013 102 103 107 109 11 113 115 116 118 12 122 123 13 131 14 15 153 156 16 165 17 172 173 174 179 18 180 183 184 186 187 19 196 1990s 1996 1997 2 20 2000 2001 2002 2003 2004 2005 2006 201 21 211 212 213 215 219 22 23 23.25 23.5 23.50 23.75 233 234 238 239 24 24.999 241 242 245 246 25 254 255 2560 26 263 27 272 274 275 28 29 291 297 299 3 30 300 309 31 314 316 32 320 323 33 331 34 340 343 344 345 346 35 352 357 358 359 36 360 361 363 364 365 366 367 369 37 374 376 379 38 381 385 387 388 389 39 396 4 40 401 406 41 414 415 416 417 418 419 42 426 427 43 438 439 44 444 449 45 450 451 452 454 456 458 459 46 462 463 464 466 470 471 480 49 5 50 510 52 535 54 59 6 600 61 63 640 65 650 67 68 69 6th 7 71 72 74 76 79 8 8.5 8.72 80 800 81 83 85 89 9 90 94710 96 978 98 99 ab abbrevi abc abc123 abil abl access accomplish accord account accumul accur achiev acknowledg across action actual ad adat add addday addit address adject adopt advanc advantag afford afterward agenc agent agilisi ahead ahold ajax albeit alert alleg allow almost alon along alphabet alreadi also alter altern although altogeth alway ambiti amend america ami amillisecond aminut among amonth amount analog anarray anatomi andanoth angel anglin anhour anim anitem annoy anoth anotheritem anothervari answer anumb anyon anyth anywher api appar appear appendix appl appli applic appreci approach appropri apress april architect area aren around arrang array arrayon arrayone.concat arraythre arraythree.join arraytosort arraytosort.sort arraytwo articl artist ascii asecond asid ask aspect asset assign assist assum asynchron ata attempt attent attribut australia author avail availwidth avoid await awar ayear ayutthaya b back back-end background backslash backspac bad badg balanc banana bangkok banish bank banner banner1.jpg banner2.jpg banner3.jpg banner4.jpg banner5.jpg banner6.jpg banner7.jpg bannerimag base basi basic basket bay becam becom begin behav behavior bell belong belt beneath benefit berkeley besid best beth better bgcolor biggest bit block blog blown blue board bodi bonus book boolean born bottom bounci bound boundari box brace bracket brake break breath bridg briefli bring brisban broccoli brook brooks-coponi brown browser buckingham bug build built busi buy buzzword c ca cabbag cach calcul call came camel cannot capabl capit caption car care carri carriag carv case case-sensit cash catch caught caus cdata ceil celebr central certain certainti cgi chair challeng chanc chang chao chapter charact characternam charactername.indexof charactername.substring charl cheat check children china choic chris christenson christian christma circumst claim class class-bas classifi clean clear cliché clickabl client client-sid close closur club cluster coauthor code coder colleagu color colvill com come command comment common commonplac communic communiti comp.lang.javascript compar comparison complement complet complex compliant compon composit compositor compris comput con concat concaten concentr concept concern condit confirm confus connect conscienci consid consider consist consol constant constrain construct constructor contact contain content context continu contribut convent convers convert cool coordin copi coponi copyright core cornel correct correspond costofappl could couldn count counterintuit countless countri cours cover crash creat credo cross cross-brows crucial css cssdiscuss cssname culprit cur current curv custom cut d daili damag danger data databas date date-rel date/time date/time-related daughter day daylight dd/mm/yy dddd dead deal debat debolski debug dec decept decid decim deciph decis decision-mak declar decreas def default defin definit delet delight delimit demo demonstr depart depend deprec depth describ descript design design-ori desir desktop despit detail detect determin develop developer.mozilla.org developer.mozilla.org/en/docs/javascript deviat devic dhtml dialog dicethrow didn die differ digit direct director disabl disadvantag discard discuss display distanc distinct distribut dive divid divis docbook document document.write doesn dollar dollartopound dom domhelp domin done dormant dosometh dot dot-com doubl download drag drag-and-drop dragand dragand-drop dramat draw drop drop-down dynam e e-mail earli earlier eas easi easier easili ed edit editor editori effect effici either electron eleg element els email emerg empti enabl enclos encod encount end english english-speak enhanc enough ensur enter entiti entri environ epoqu equal equat errata erron error escap especi essenti et etc etoy euro europ eurostoconvert eurotodollarr evalu even event everi everybodi everyon everyth evil evolt ewan exact examin exampl except excess exchang excit execut exist expect experi experienc expert explain explicit explor expos express extend extens exterior extra extract extrem f facet fact failur fake fals familiar faq far fashion fault fax fear featur februari feed feedback feel fellow field file fill filter final financi find fine finer finish firefox first firstnam firstnameindex fish fit five fix flash flashi flexibl float floor folder follow font food footbal forc forev foreword forgiv forgotten fork form format former forum forumdisplay.php forward found four fourth fraction frequent friend frown fruit full full-blown fullarray fullarray.slice fun function fundament gain galleri game gap gari gasolin gateway gecko gecko-bas geek general generat gennick georg germani get gethour gettimezoneoffset getutchour ghi gilmor give given glanc global gmail go gone good googl gordon got grant graph great greater green greenwich grew grochtdrei group grow growth guid h hack hand handi handl happen happi hard hardwar hassel haven head headlin hear height heilmann held hello help helper hex hexadecim hidden hide high high-resolut high-secur higher highlight highres.css histori hit hold homer hook hope host hour household howev html huddleston huge human hundr hurt icant.co.uk id idea ideal identifi ie5.5 ignit imag immedi implement implic implicit import impress improv in-depth in-pag inc includ incorrect increas inde indent independ index indexof indic indirect individu indulg influenc [email protected] inform infring ingo inherit initi inkl inner innerhtml innov input insert insid instal instanc instant instead instruct integ intellig intend intent interact interest interf interfac interfer internation internet interpret interspers intrepid intric introduc introduct involv ioanna isbn isn isol issu item itemindex itemkeyword ix jame jan januari japanes jason java javascript javascript-rel javascriptenhanc jen jeremi jibbering.com jibbering.com/faq/ jim job john join joinedarray joinedarray.length jon jonathan jqueri jslint json jsunit kari kati keen keep keir keith kept key keyboard keyword kind know knowledg known knox krame kryogenix.org kryogenix.org/days/ kurt l label laid langridg languag laptop larg larger last lastindexof late later latin layer layout lead leader leap learn least leav leclerc led left lemon length less let letter level liabil librari lie life like limit line lineup lineup.split link linux liquid list lists.evolt.org lists.evolt.org/mailman/listinfo/thelist liter littl live ll llo load local logic long long-stand longer look loop loos lori loss lost lot low low-resolut lower lowercas lowres.css lucki m made mail main mainstream maintain mainten major make malign manag mandatori mani manipul manner manufactur map margin mark market markup math math.ceil math.floor math.methodofmathobject math.pi math.random math.round mathemat matt matter matthew matur maxim may mayb mean meaning meaningless measur mechan mediocr medium meet member members.length mention menus merit messag messi met method methodolog microsoft mid mid-resolut mid-to-l might mill million miln mimic mind mindset mine minut mismatch misnom misspel mistak misus mm/dd/yy mobil model modern modulus moment monitor month moodi move mozilla much multicolumn multilevel multilin multipl multipli munich must mutter myarray mycalc mynam mynewstr myoldstr myoldstring.substring myprimitivestr myrespons mysql mystringobject mystringobject.length mystringprimit mystringprimitive.length myth myvari n name nan napl navig necessari necessarili need neighbor neither netscap network never new newer newlin newmillennium next nice nicer nicol nightmar ninth nn non non-javascript non-javascript-savvi non-w3c-compliant none nonnumer norm normal noscript notat note noth notic notifi noun nourish novic null number numbertoround numer ny nyman o object object-bas object-ori obsolet obtain obvious occasion occur occurr offer often ok old omit one one-lin one-size-fits-al onlin onto onward oop open oper opera operand opposit optim option order [email protected] orient origin originald originaldate.getdate originaldate.setdate originaldate.tostring other otherwis output outsid overal overwrit owner ozcelik p page pagin paragraph paramet parent parenthes parenthesi pars parsefloat parseint part parti particular pass password past pat paul pbk pc pda pdf pear peer peopl perfect perform perhap perman permiss person phone photocopi php pi pick piec pirat pixel pizzadeliqu place placehold platform pleas plug plus point pop pop-up popul popular portion pose posit possibl post power practic precaut preced predeterminedsizearray preinitarray preload premis prepar present press pretti prevent previous primit print prior probabl problem problem-solut process produc product profession program programm progress project promis promot prompt proofread proper properti pros protect prototyp prove provid pseudostandard publish purchas pure purpos put quantifi question quick quicker quit quot quotat r radio random randomimageindex rate rather re reach read readabl reader readi real real-world realiz realli realworld reason recal recent recip recogn recognit recommend record red refer refresh regular reject relat reli relief reload remain rememb remind remov render repeat repetit replac report repositori repres represent reproduc reput request reserv reset resist resolut resolutioninfo resolv resourc respect respons rest restrict result retriev return reus reusabl revers reversearray review revolutionari rewrit rich richer right ringo risen robert robertnyman.com rollov round row rss rule rumor run rush sad safari safe said sake save savvi saw say school scope scratch screen screen.availwidth screenread script search second secret section secur see seeker seen segment select semicolon send sens sensit sentenc separ septemb sequenc sequenti seri server server-sid servic set setmonth setup setutcmonth sever shakeshaft shall shape share sheet shop short shortcut shorten shorter shovel show sibl side sight sign similar simon simon.incutio.com simpl simpli simpson simul simultan sinc singl sit site situat six sixth size skip slashdot.org sleep slice sliceofarray slicker slide slight slow small smaller snippet snook so-cal softwar solid solut solv somed somedate.getdate somedate.getfullyear somedate.getminutes somedate.getmonth somedate.setdate somedate.setminutes someon someth sometim somewher sort sortedarray sortedarray.reverse sourc space spacecraft span speak specif specifi speed spenc spent spici split spot spring springer springer-verlag squar stand standard start state statement static stenc step stephen steve still stipul stop storag store stream street strict stricter string strip structur stuart studi stuff style subsequ substr subtract success sudden suffer suit suitabl sum summari sumser suppli support suppos sure surround swift switch symbol syntax system tab tabl tag take taken talent talk task tast teach teacher technic techniqu technolog tell templat temporari temporarili tend term ternari test text thai thank thelist therefor thing think third third-parti thisvari thoma though thought three threw throughout throw thrown thu thumbnail thus ticker time tip todatestr todaysd togeth told tom ton tool toolbox top tostr total touch toy trace trade trademark translat transmit treasur treat tri trick troubl trove true trust tu turn twice two type typeof u u0043 udddd ugli uk ultim unaffect unavail unavoid uncom uncov undefin under underr underscor understand unexpect unicod uniqu unit univers unknown unlik unlock unobtrus untold untouch unwant updat upgrad url us usabl use user useremail useremail.indexof userenterednumb usual utc v valid valu valuabl var variabl varieti ve vehicl vendor verb verlag versa versatil version via viabl vibrant vice view vii viii visit visitor visual voic volkan vs w3c w3c-compliant wade wait wait-till-i.com want war warden warn warranti wart wasp way wealth web webdeveloper.com well weren western whatev wherev whether whitespac whole wide width wildcard wilder willison window wireless wisdom wish within without won word work world worldwid worst worth would wouldn wrap write writer written wrong wrox www.adactio.com www.apress.com www.beginningjavascript.com www.mozilla.org www.mozilla.org/docs/web-developer/). www.snook.ca www.snook.ca/jonathan/ www.springeronline.com www.unicode.org www.webdeveloper.com www.webdeveloper.com/forum/ www.webstandards.org www.webstandards.org/action/dstf/ x x43 xhr xhtml xi xii xiii xix xml xmlhttprequest xnn xv xvii xxi xxii xxiii yahoo year yen yet york yourarray yui yy/mm/dd zero zero-bas zone