Simply JavaScript

Overview

Everything you need to learn JavaScript from Scratch!

Packed with numerous examples, Simply JavaScript is a step-by-step introduction to programming in JavaScript the right way. Learn how easy it is to use JavaScript to solve real-world problems, build smarter forms, track user events (such as mouse clicks and key strokes), and design eye-catching animations. Then move into ...

See more details below
Paperback
$29.43
BN.com price
(Save 26%)$39.95 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (34) from $1.99   
  • New (9) from $8.50   
  • Used (25) from $1.99   
Sending request ...

Overview

Everything you need to learn JavaScript from Scratch!

Packed with numerous examples, Simply JavaScript is a step-by-step introduction to programming in JavaScript the right way. Learn how easy it is to use JavaScript to solve real-world problems, build smarter forms, track user events (such as mouse clicks and key strokes), and design eye-catching animations. Then move into more powerful techniques using the DOM and Ajax.

  • Learn JavaScript's built-in functions, methods, and properties.
  • Easily integrate JavaScript in your web site.
  • Use JavaScript to validate form entries and interact with your users.
  • Understand how to respond to user events.
  • Create animations that bring your web site to life.
  • Start programming using the DOM and Ajax.

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, so you can get started instantly!

Read More Show Less

Product Details

  • ISBN-13: 9780980285802
  • Publisher: SitePoint Pty, Limited
  • Publication date: 6/1/2007
  • Edition number: 1
  • Pages: 424
  • Sales rank: 738,404
  • Product dimensions: 6.97 (w) x 9.09 (h) x 0.85 (d)

Meet the Author

Kevin Yank is a world-renowned leader in web development. When not writing best sellers, Kevin is the Technical Director of sitepoint.com and editor of the popular SitePoint Tech Times newsletter.

Cameron Adams is an author of multiple web development books and is often referred to as a "Web Technologist." In addition to his extensive JavaScript experience, Cameron's passions extend to CSS, PHP, and graphic design.

Read More Show Less

Table of Contents


Preface     xvii
Who Should Read this Book?     xviii
What's Covered in this Book?     xviii
The Book's Web Site     xx
The Code Archive     xx
Updates and Errata     xx
The SitePoint Forums     xxi
The SitePoint Newsletters     xxi
Your Feedback     xxi
Acknowledgments     xxi
Kevin Yank     xxi
Cameron Adams     xxii
Conventions Used in this Book     xxiii
Code Samples     xxiii
Tips, Notes, and Warnings     xxiv
The Three Layers of the Web     1
Keep 'em Separated     2
Three Layers     4
HTML for Content     6
CSS for Presentation     8
JavaScript for Behavior     9
The Right Way     11
JavaScript Libraries     11
Let's Get Started!     12
Programming with JavaScript     13
Running a JavaScript Program     14
Statements: Bite-sized Chunks for your Browser     17
Comments: Bite-sized Chunks Just for You     18
Variables: Storing Data for your Program     19
Variable Types: Different Typesfor Different Data     23
Conditions and Loops: Controlling Program Flow     35
Conditions: Making Decisions     36
Loops: Minimizing Repetition     43
Functions: Writing Code for Later     48
Arguments: Passing Data to a Function     50
Return Statements: Outputting Data from a Function     52
Scope: Keeping your Variables Separate     54
Objects     55
Unobtrusive Scripting in the Real World     58
Summary     59
Document Access     61
The Document Object Model: Mapping your HTML     61
Text Nodes     64
Attribute Nodes     65
Accessing the Nodes you Want     66
Finding an Element by ID     67
Finding Elements by Tag Name     70
Finding Elements by Class Name     74
Navigating the DOM Tree     79
Interacting with Attributes     82
Changing Styles     85
Changing Styles with Class     87
Example: Making Stripy Tables     92
Finding All Tables with Class dataTable     93
Getting the Table Rows for Each Table     94
Adding the Class alt to Every Second Row      96
Putting it All Together     96
Exploring Libraries     99
Prototype     99
jQuery     100
Dojo     102
Summary     102
Events     105
An Eventful History     106
Event Handlers     107
Default Actions     111
The this Keyword     112
The Problem with Event Handlers     115
Event Listeners     116
Default Actions     119
Event Propagation     122
The this Keyword     127
The Internet Explorer Memory Leak     128
Putting it All Together     129
Example: Rich Tooltips     132
The Static Page     133
Making Things Happen     134
The Workhorse Methods     135
The Dynamic Styles     140
Putting it All Together     142
Example: Accordion     144
The Static Page     144
The Workhorse Methods     146
The Dynamic Styles     148
Putting it All Together     150
Exploring Libraries     158
Summary     160
Animation     163
The Principles of Animation     163
Controlling Time with JavaScript     165
Using Variables with setTimeout     168
Stopping the Timer     172
Creating a Repeating Timer     174
Stopping setInterval     175
Revisiting Rich Tooltips     175
Old-school Animation in a New-school Style     176
Path-based Motion     181
Animating in Two Dimensions     190
Creating Realistic Movement     192
Moving Ahead     198
Revisiting the Accordion Control     198
Making the Accordion Look Like it's Animated     198
Changing the Code     199
Exploring Libraries     208
script.aculo.us     208
Summary     211
Form Enhancements     213
HTML DOM Extensions     214
Example: Dependent Fields     216
Example: Cascading Menus     226
Form Validation     239
Intercepting Form Submissions     240
Regular Expressions     243
Example: Reusable Validation Script     249
Custom Form Controls     256
Example: Slider     256
Exploring Libraries      271
Form Validation     272
Custom Controls     274
Summary     275
Errors and Debugging     277
Nothing Happened!     278
Common Errors     282
Syntax Errors     283
Runtime Errors     288
Logic Errors     292
Debugging with Firebug     296
Summary     303
Ajax     305
XMLHttpRequest: Chewing Bite-sized Chunks of Content     306
Creating an XMLHttpRequest Object     307
Calling a Server     310
Dealing with Data     314
A Word on Screen Readers     316
Putting Ajax into Action     316
Seamless Form Submission with Ajax     329
Exploring Libraries     337
Prototype     339
Dojo     340
jQuery     341
YUI     341
MooTools     342
Summary     343
Looking Forward     345
Bringing Richness to the Web     346
Easy Exploration     346
Easy Visualization     347
Unique Interaction     349
Rich Internet Applications      352
Widgets     355
JavaScript Off the Web     356
Exploring Libraries     357
Dojo     358
Google Web Toolkit     361
Summary     362
The Core JavaScript Library     363
The Object     363
Event Listener Methods     364
Script Bootstrapping     375
CSS Class Management Methods     378
Retrieving Computed Styles     379
The Complete Library     379
Index     387
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)