Simply Javascript

  • ISBN13:


  • ISBN10:


  • Format: Paperback
  • Copyright: 6/21/2007
  • Publisher: Oreilly & Associates Inc

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping On Orders Over $59!
    Your order must be $59 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.95 Save up to $38.86
  • Rent Book $5.00
    Add to Cart Free Shipping


Supplemental Materials

What is included with this book?

  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
  • The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.


Simply JavaScript is for first-time JavaScript programmers. The authors, Kevin Yank and Cameron Adams will teach you JavaScript basics from the ground up. You'll learn about popular JavaScript libraries that can ease your scripting headaches, as well how to achieve dozens of common tasks. Unlike other JavaScript books, modern best practices such as progressive enhancement, accessibility and unobtrusive scripting are used from the very beginning. All the code in the book is also cross- browser compatible and downloadable for free.

Table of Contents

Prefacep. xvii
Who Should Read this Book?p. xviii
What's Covered in this Book?p. xviii
The Book's Web Sitep. xx
The Code Archivep. xx
Updates and Erratap. xx
The SitePoint Forumsp. xxi
The SitePoint Newslettersp. xxi
Your Feedbackp. xxi
Acknowledgmentsp. xxi
Kevin Yankp. xxi
Cameron Adamsp. xxii
Conventions Used in this Bookp. xxiii
Code Samplesp. xxiii
Tips, Notes, and Warningsp. xxiv
The Three Layers of the Webp. 1
Keep 'em Separatedp. 2
Three Layersp. 4
HTML for Contentp. 6
CSS for Presentationp. 8
JavaScript for Behaviorp. 9
The Right Wayp. 11
JavaScript Librariesp. 11
Let's Get Started!p. 12
Programming with JavaScriptp. 13
Running a JavaScript Programp. 14
Statements: Bite-sized Chunks for your Browserp. 17
Comments: Bite-sized Chunks Just for Youp. 18
Variables: Storing Data for your Programp. 19
Variable Types: Different Types for Different Datap. 23
Conditions and Loops: Controlling Program Flowp. 35
Conditions: Making Decisionsp. 36
Loops: Minimizing Repetitionp. 43
Functions: Writing Code for Laterp. 48
Arguments: Passing Data to a Functionp. 50
Return Statements: Outputting Data from a Functionp. 52
Scope: Keeping your Variables Separatep. 54
Objectsp. 55
Unobtrusive Scripting in the Real Worldp. 58
Summaryp. 59
Document Accessp. 61
The Document Object Model: Mapping your HTMLp. 61
Text Nodesp. 64
Attribute Nodesp. 65
Accessing the Nodes you Wantp. 66
Finding an Element by IDp. 67
Finding Elements by Tag Namep. 70
Finding Elements by Class Namep. 74
Navigating the DOM Treep. 79
Interacting with Attributesp. 82
Changing Stylesp. 85
Changing Styles with Classp. 87
Example: Making Stripy Tablesp. 92
Finding All Tables with Class dataTablep. 93
Getting the Table Rows for Each Tablep. 94
Adding the Class alt to Every Second Rowp. 96
Putting it All Togetherp. 96
Exploring Librariesp. 99
Prototypep. 99
jQueryp. 100
Dojop. 102
Summaryp. 102
Eventsp. 105
An Eventful Historyp. 106
Event Handlersp. 107
Default Actionsp. 111
The this Keywordp. 112
The Problem with Event Handlersp. 115
Event Listenersp. 116
Default Actionsp. 119
Event Propagationp. 122
The this Keywordp. 127
The Internet Explorer Memory Leakp. 128
Putting it All Togetherp. 129
Example: Rich Tooltipsp. 132
The Static Pagep. 133
Making Things Happenp. 134
The Workhorse Methodsp. 135
The Dynamic Stylesp. 140
Putting it All Togetherp. 142
Example: Accordionp. 144
The Static Pagep. 144
The Workhorse Methodsp. 146
The Dynamic Stylesp. 148
Putting it All Togetherp. 150
Exploring Librariesp. 158
Summaryp. 160
Animationp. 163
The Principles of Animationp. 163
Controlling Time with JavaScriptp. 165
Using Variables with setTimeoutp. 168
Stopping the Timerp. 172
Creating a Repeating Timerp. 174
Stopping setIntervalp. 175
Revisiting Rich Tooltipsp. 175
Old-school Animation in a New-school Stylep. 176
Path-based Motionp. 181
Animating in Two Dimensionsp. 190
Creating Realistic Movementp. 192
Moving Aheadp. 198
Revisiting the Accordion Controlp. 198
Making the Accordion Look Like it's Animatedp. 198
Changing the Codep. 199
Exploring Librariesp. 208
script.aculo.usp. 208
Summaryp. 211
Form Enhancementsp. 213
HTML DOM Extensionsp. 214
Example: Dependent Fieldsp. 216
Example: Cascading Menusp. 226
Form Validationp. 239
Intercepting Form Submissionsp. 240
Regular Expressionsp. 243
Example: Reusable Validation Scriptp. 249
Custom Form Controlsp. 256
Example: Sliderp. 256
Exploring Librariesp. 271
Form Validationp. 272
Custom Controlsp. 274
Summaryp. 275
Errors and Debuggingp. 277
Nothing Happened!p. 278
Common Errorsp. 282
Syntax Errorsp. 283
Runtime Errorsp. 288
Logic Errorsp. 292
Debugging with Firebugp. 296
Summaryp. 303
Ajaxp. 305
XMLHttpRequest: Chewing Bite-sized Chunks of Contentp. 306
Creating an XMLHttpRequest Objectp. 307
Calling a Serverp. 310
Dealing with Datap. 314
A Word on Screen Readersp. 316
Putting Ajax into Actionp. 316
Seamless Form Submission with Ajaxp. 329
Exploring Librariesp. 337
Prototypep. 339
Dojop. 340
jQueryp. 341
YUIp. 341
MooToolsp. 342
Summaryp. 343
Looking Forwardp. 345
Bringing Richness to the Webp. 346
Easy Explorationp. 346
Easy Visualizationp. 347
Unique Interactionp. 349
Rich Internet Applicationsp. 352
Widgetsp. 355
JavaScript Off the Webp. 356
Exploring Librariesp. 357
Dojop. 358
Google Web Toolkitp. 361
Summaryp. 362
The Core JavaScript Libraryp. 363
The Objectp. 363
Event Listener Methodsp. 364
Script Bootstrappingp. 375
CSS Class Management Methodsp. 378
Retrieving Computed Stylesp. 379
The Complete Libraryp. 379
Indexp. 387
Table of Contents provided by Ingram. All Rights Reserved.

Rewards Program

Write a Review