Books & Videos

Table of Contents

  1. Chapter 1 Getting Started with JavaScript

    1. JavaScript Defined

    2. JavaScript’s Limitations

    3. JavaScript Best Practices

    4. Providing for Users who Don’t Have JavaScript (Progressive Enhancement)

    5. Separating Content from Behavior (Unobtrusive Scripting)

    6. Using Braces and Semicolons (Consistent Coding Practice)

    7. Adding a Script to a Page

    8. Getting Multiple Scripts to Work on the Same Page

    9. Hiding JavaScript Source Code

    10. Debugging a Script

    11. Strict Warnings

    12. Summary

  2. Chapter 2 Working with Numbers

    1. Doing Math with JavaScript

    2. Rounding a Number to x Decimal Places

    3. Creating and Constraining Random Numbers

    4. Converting a Number to a String

    5. Formatting Currency Values

    6. Converting a String to a Number

    7. Converting Numbers to Ordinals (-st, -nd, -rd, -th)

    8. Summary

  3. Chapter 3 Working with Strings

    1. Including a Special Character in a String

    2. Transforming the Character Case of a String

    3. Encoding a URL

    4. Comparing Two Strings

    5. Finding a Substring within a String

    6. Splitting a String into Substrings

    7. Creating a Regular Expression

    8. Testing whether a String Matches a Regular Expression

    9. Testing whether a String Contains Only Numeric Data

    10. Testing whether a String is a Valid Phone Number

    11. Testing whether a String is a Valid Email Address

    12. Searching and Replacing Text using a Regular Expression

    13. Summary

  4. Chapter 4 Working with Arrays

    1. Using Array-literals

    2. Creating an Array of Arrays

    3. Indexing an Array with Strings Instead of Numbers

    4. Turning an Array into a String

    5. Adding or Removing Members from an Array

    6. Sorting an Array into Alphabetical or Numeric Order

    7. Sorting a Multi-dimensional Array

    8. Sorting an Array Randomly

    9. Summary

  5. Chapter 5 Navigating the Document Object Model

    1. Accessing Elements

    2. Creating Elements and Text Nodes

    3. Changing the Type of an Element

    4. Removing an Element or Text Node

    5. Reading and Writing the Attributes of an Element

    6. Getting all Elements with a Particular Attribute Value

    7. Adding and Removing Multiple Classes to/from an Element

    8. Summary

  6. Chapter 6 Processing and Validating Forms

    1. Reading and Writing the Data in a Text Field

    2. Reading and Setting the State of a Checkbox

    3. Reading and Setting the State of a Radio Button

    4. Reading and Setting the Value of a Select Box

    5. Validating a Mandatory Text Field

    6. Validating a Numeric Field

    7. Validating an Email Address Field

    8. Checking for Unselected Radio Buttons

    9. Stopping a Form Being Submitted Unless all its Fields are Valid

    10. Validating a Form with an Unknown Number of Fields

    11. Printing Inline Error Messages when Validating a Form

    12. Making Form Fields Appear or Disappear, Based on the Value of other Fields

    13. Summary

  7. Chapter 7 Working with Windows and Frames

    1. Using Popup Windows

    2. Opening Off-site Links in a New Window

    3. Communicating Between Frames

    4. Getting the Scrolling Position

    5. Making the Page Scroll to a Particular Position

    6. Getting the Viewport Size (the Available Space inside the Window)

    7. Summary

  8. Chapter 8 Working with Cookies

    1. Writing Cookies

    2. Reading a Cookie

    3. Setting a Cookie to Expire at a Specific Date and Time

    4. Making a Cookie Accessible Only from a Specific Domain or Path

    5. Circumventing Browser Restrictions on the Number of Cookies you can Use

    6. Summary

  9. Chapter 9 Working with Dates and Times

    1. Getting the Date and Time

    2. Formatting a Date into a Sentence

    3. Formatting the Time into a 12- or 24-hour Clock

    4. Comparing Two Dates

    5. Formatting the Difference Between Dates

    6. Summary

  10. Chapter 10 Working with Images

    1. Preloading Images

    2. Swapping One Image for Another

    3. Displaying an Image at Random

    4. Making a Slideshow of Several Images

    5. Making an Image Fade in or out

    6. Making an Image-based Clock that Updates in Real Time

    7. Making a Progress Indicator

    8. Summary

  11. Chapter 11 Detecting Browser Differences

    1. Identifying Support for a Particular Feature

    2. Identifying a Particular Browser

    3. Detecting Quirks Mode and Standards Mode

    4. Summary

  12. Chapter 12 Using JavaScript with CSS

    1. Changing the Style of a Single Element

    2. Changing the Style of a Group of Elements

    3. Retrieving the Computed Style of an Element

    4. Making a Style Sheet Switcher

    5. Making a Style Sheet Switcher that Handles Multiple Media Types

    6. Reading and Modifying an Existing Style Sheet

    7. Adding New Style Sheet Rules

    8. Deleting a Rule from a Style Sheet

    9. Creating a New Style Sheet

    10. Summary

  13. Chapter 13 Basic Dynamic HTML

    1. Handling Events

    2. Finding the Size of an Element

    3. Finding the Position of an Element

    4. Detecting the Position of the Mouse Cursor

    5. Displaying a Tooltip when you Mouse Over an Element

    6. Sorting Tables by Column

    7. Summary

  14. Chapter 14 Time and Motion

    1. Using setTimeout and setInterval

    2. Making an Object Move Along a Set Path

    3. Making Animation Less Jerky

    4. Implementing Drag-and-drop Behavior

    5. Reordering a List Using Drag-and-drop Functionality

    6. Making a Scrolling News Ticker

    7. Creating Clip-based Transition Effects

    8. Making a Slider Control

    9. Summary

  15. Chapter 15 DHTML Menus and Navigation

    1. Making a Drop-down or Fly-out Menu

    2. Adding Arrows to Indicate the Presence of a Submenu

    3. Adding Timers so the Menus Don’t Open and Close so Abruptly

    4. Making Sure the Menus Stay Inside the Window

    5. Making the Menus Display Over select Elements

    6. Making a Folder Tree or Expanding Menu

    7. Indicating Expanded Branches in a Menu

    8. Allowing Only One Menu Branch to Be Open at Any Time

    9. Opening the Current Sub-branch Automatically

    10. Summary

  16. Chapter 16 JavaScript and Accessibility

    1. Is JavaScript Inaccessible?

    2. Making Scripts Accessible to the Keyboard

    3. Using Device-independent Event Handlers

    4. Making Scripts Accessible to the Keyboard as well as the Mouse

    5. Making title Attribute Tooltips Display on Focus

    6. Making a DHTML Menu Accessible to the Keyboard

    7. Making a DHTML Menu Usable via the Keyboard

    8. Making a DHTML Slider Control Accessible to the Keyboard

    9. Making Scripts Accessible to Screen Readers

    10. Summary

  17. Chapter 17 Using JavaScript with Flash

    1. Detecting whether Flash is Installed in a Browser

    2. Communicating Between JavaScript and Flash

    3. Summary

  18. Chapter 18 Building Web Applications with JavaScript

    1. Retrieving Data Using XMLHttpRequest

    2. Retrieving Data without Using XMLHttpRequest

    3. Creating Custom Dialogs (Such as Popup Forms)

    4. Creating Editable Elements

    5. Controlling Text Selections

    6. Creating an Auto-complete Text Field

    7. Summary

  19. Chapter 19 Object Orientation in JavaScript

    1. What’s so Good about Object Orientation?

    2. Object Based Code vs Object Oriented Code

    3. Writing an Object Oriented Script

    4. Creating Methods for an Object

    5. Modelling Inheritance

    6. Understanding Scope

    7. Implementing Namespaces

    8. Summary

  20. Chapter 20 Keeping up the Pace

    1. Making Scripts Run Faster

    2. Writing Scripts Using Less Code

    3. Optimizing Scripts for the Web

    4. Avoiding Memory Leaks

    5. Making Scripts Run Before the Load Event

    6. Summary