Description
The Book of JavaScript teaches readers how to add interactivity, animation, and other tricks to their web sites with JavaScript. Rather than provide a series of cut-and-paste scripts, thau! takes the reader through a series of real world JavaScript code with an emphasis on understanding. Each chapter focuses on a few important JavaScript features, shows how professional web sites incorporate them, and takes readers through examples of how they might add those features to their own web sites.
Full Description
Table of Contents
-
Chapter 1 WELCOME TO JAVASCRIPT!
-
Is JavaScript for You?
-
Is This Book for You?
-
The Goals of This Book
-
What Can JavaScript Do?
-
What Are the Alternatives to JavaScript?
-
JavaScript's Limitations
-
Getting Started
-
Where JavaScript Goes on Your Web Pages
-
Dealing with Older Browsers
-
Your First JavaScript
-
Summary
-
Assignment
-
-
Chapter 2 USING VARIABLES AND BUILT-IN FUNCTIONS TO UPDATE YOUR WEB PAGES AUTOMATICALLY
-
Variables Store Information
-
Write Here Right Now: Displaying Results
-
Strings
-
More About Functions
-
Parameters
-
Writing the Date to Your Web Page
-
How the European Space Agency Writes the Date to Its Page
-
Summary
-
Assignment
-
-
Chapter 3 GIVING THE BROWSERS WHAT THEY WANT
-
A Real-World Example of Browser Detection
-
Browser Detection Methods
-
Redirecting Visitors to Other Pages
-
if-then Statements
-
OR and AND
-
Putting It All Together
-
A Few More Details About Boolean Expressions
-
How Netscape Provides Browser-Specific Content
-
Summary
-
Assignment
-
-
Chapter 4 WORKING WITH ROLLOVERS
-
A Real-World Example of Rollovers
-
Triggering Events
-
Swapping Images
-
Working with Multiple Images
-
What's with All the Dots?
-
How the Tin House Rollovers Work
-
Summary
-
Assignment
-
-
Chapter 5 OPENING AND MANIPULATING WINDOWS
-
Real-World Examples of Opening Windows to Further Information
-
Working with Windows as Objects
-
Opening Windows
-
Closing Windows
-
Using the Right Name: How Windows See Themselves and Each Other
-
Moving Windows to the Front or Back of the Screen
-
Window Properties
-
More Window Methods
-
Summary
-
Assignment
-
-
Chapter 6 WRITING YOUR OWN JAVASCRIPT FUNCTIONS
-
Functions as Shortcuts
-
Writing Flexible Functions
-
Getting Information from Functions
-
Dealing with Y2K
-
Defining Variables Properly
-
Summary
-
Assignment
-
-
Chapter 7 PROVIDING AND RECEIVING INFORMATION WITH FORMS
-
Real-World Examples of Forms
-
Form Basics
-
Forms and JavaScript
-
Reading and Setting Form Elements
-
Handling Events Using Form Elements
-
Make this a Shortcut
-
Using Pull-Down Menus as Navigational Tools
-
One Last Forms Shortcut
-
How the Doctors Without Borders Pull-Down Navigation Tool Works
-
Summary
-
Assignment
-
-
Chapter 8 KEEPING TRACK OF INFORMATION WITH ARRAYS AND LOOPS
-
Real-World Examples of Arrays
-
JavaScript's Built-In Arrays
-
Figuring Out How Many Items an Array Contains
-
Going Through Arrays
-
while Loops
-
for Loops
-
How AntWeb Checks Off All the Checkboxes
-
Creating Your Own Arrays
-
How the Book of JavaScript Tip Box Works
-
Loops Can Nest
-
Creating Arrays As You Go Along
-
Associative Arrays
-
Summary
-
Assignment
-
-
Chapter 9 TIMING EVENTS
-
Real-World Examples of Timing Events
-
Setting an Alarm with setTimeout()
-
Canceling an Alarm with clearTimeout()
-
Repeating Timed Actions
-
Building a Clock with Timing Loops
-
How the Book of JavaScript Website's Timer Works
-
How Space.com's Countdown Script Works
-
A Timed Slide Show
-
A Safer Version of rotateImage()
-
Summary
-
Assignment
-
-
Chapter 10 USING FRAMES AND IMAGE MAPS
-
A Real-World Example of Frames and Image Maps
-
Frames
-
Image Maps
-
How Salon's Bug-Eating Script Works
-
Summary
-
Assignment
-
-
Chapter 11 VALIDATING FORMS, MASSAGING STRINGS, AND WORKING WITH SERVER-SIDE PROGRAMS
-
A Real-World Example of Form Validation
-
Making Sure a Visitor Has Filled Out a Form Element
-
String Handling
-
How Dictionary.com's Form Validators Work
-
Summary
-
Assignment
-
-
Chapter 12 SAVING VISITOR INFORMATION WITH COOKIES
-
A Real-World Example of Cookies
-
What Are Cookies?
-
What Cookies Can and Can't Do
-
Working with Cookies
-
Cookie Libraries
-
A Cookie-Based Shopping Cart
-
Summary
-
Assignment
-
-
Chapter 13 DYNAMIC HTML
-
Real-World Examples of DHTML
-
CSS Basics
-
JavaScript and DHTML
-
Making divs Move
-
Using setTimeout() and clearTimeout() to Animate a Page
-
Changing the Contents of a div
-
spans and getElementsByTagName()
-
Advanced DOM Techniques
-
Fancy Event Handling
-
Drop-Down Menus
-
Summary
-
Assignment
-
-
Chapter 14 AJAX BASICS
-
A Real-World Example of Ajax
-
Introduction to Ajax
-
Creating and Sending Requests
-
Demonstrating Asynchronicity
-
Ajax and Usability
-
To Ajax, or Not to Ajax
-
Summary
-
Assignment
-
-
Chapter 15 XML IN JAVASCRIPT AND AJAX
-
A Real-World Example of Ajax and XML
-
Google Suggest
-
XML—the Extensible Markup Language
-
The Rules of XML
-
Processing XML
-
Creating a Suggest Application for Translation
-
Summary
-
Assignment
-
-
Chapter 16 SERVER-SIDE AJAX
-
Real-World Examples of Server-Side Ajax
-
The Power of Webservers
-
A Server-Side Programming Language
-
PHP Basics
-
Sending Simple Input to PHP with a GET Request
-
Creating a Google Suggest Application with an Ajax GET Request
-
Ajax and the POST Method
-
HEAD Requests: Getting Information About a Server-Side File
-
The Caching Problem
-
File Handling in PHP
-
When Communication Breaks Down
-
Automatically Updating a Web Page When a Server-Side File Changes
-
Summary
-
Assignment
-
-
Chapter 17 PUTTING IT ALL TOGETHER IN A SHARED TO DO LIST
-
Features of the To Do List Application
-
To Do List Data Files
-
To Do List Server Side
-
The To Do List Client Side, Part 1: The HTML
-
The To Do List Client Side, Part 2: The JavaScript
-
A Few Closing Notes
-
Summary
-
Assignment
-
-
Chapter 18 DEBUGGING JAVASCRIPT AND AJAX
-
Good Coding Practices
-
Avoiding Common Mistakes
-
Finding Bugs
-
Fixing Bugs
-
Summary
-
-
Appendix ANSWERS TO ASSIGNMENTS
-
Appendix RESOURCES
-
Tutorials
-
Example JavaScript and Ajax Code
-
Good Ajax Websites
-
Ajax Frameworks
-
-
Appendix REFERENCE TO JAVASCRIPT OBJECTS AND FUNCTIONS
-
alert() [FF, IE 3]
-
Anchor
-
Applet
-
Area [FF, IE 3]
-
Array [FF, IE 3]
-
Button (Including Submit and Reset Buttons)
-
Checkbox
-
clearInterval() [FF, IE 4]
-
clearTimeout() [FF, IE 3]
-
confirm() [FF, IE 3]
-
Date
-
Document
-
elements[] [FF, IE 3]
-
escape() [FF, IE 3]
-
eval() [FF, IE 3]
-
Event
-
FileUpload
-
Form
-
Hidden
-
History
-
HTMLElement [FF, IE 4]
-
Image
-
isNaN() [FF, IE 4]
-
Link
-
Location
-
Math [FF, IE 3]
-
Navigator
-
Number
-
Option
-
parseInt() [FF, IE 3]
-
parseFloat() [FF, IE 3]
-
Password
-
prompt()
-
Radio
-
Reset
-
Screen
-
Select
-
setInterval() [FF, IE 4]
-
setTimeout() [FF, IE 3]
-
String
-
Style [FF, IE 4]
-
Submit
-
Text
-
Textarea
-
this [FF, IE 3]
-
unescape() [FF, IE 3]
-
var [FF, IE 3]
-
window
-
XMLHttpRequest [FF] and ActiveXObject("Microsoft.XMLHTTP") [IE 5.5]
-
-
Appendix CHAPTER 15'S ITALIAN TRANSLATOR AND CHAPTER 17'S TO DO LIST APPLICATION
-
Chapter 15's Italian Translator
-
Chapter 17's To Do List Application
-
-
COLOPHON
Product Details
- Title:
- The Book of JavaScript, Second Edition
- By:
- thau!
- Publisher:
- No Starch Press
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- December 2006
- Ebook Release:
- August 2009
- Pages:
- 514
- Print ISBN:
- 978-1-59327-106-0
- | ISBN 10:
- 1-59327-106-9
- Ebook ISBN:
- 978-1-59327-130-5
- | ISBN 10:
- 1-59327-130-1
Customer Reviews
