JavaScript and Ajax for the Web, Sixth Edition: Visual QuickStart Guide

Book description

Need to learn JavaScript fast? This best-selling reference’s visual format and step-by-step, task-based instructions will have you up and running with JavaScript in no time. In this completely updated edition of our best-selling guide to JavaScript, leading Web and computing experts Tom Negrino and Dori Smith use crystal-clear instructions and friendly prose to introduce you to all of today's JavaScript essentials. Along the way, you'll find extensive coverage of Ajax and XML techniques, current browsers (Opera, Safari, Firefox), and more.

Visual QuickStart Guide--the quick and easy way to learn!

  • Easy visual approach uses pictures to guide you through JavaScript and show you what to do.

  • Concise steps and explanations get you up and running in no time.

  • Page for page, the best content and value around.

  • Companion Web site at www.javascriptworld.com offers sample scripts, updates, and more!

  • Table of contents

    1. Copyright
      1. Dedication
    2. Special Thanks To
    3. Introduction
      1. We Wrote this Book for You
      2. How to Use this Book
      3. You Say Browser, We Say Kumbaya
      4. Don’t Type that Code!
      5. Time to Get Started
    4. 1. Getting Acquainted with JavaScript
      1. What JavaScript Is
      2. JavaScript Isn’t Java
      3. Where JavaScript Came From
      4. What JavaScript Can Do
      5. What JavaScript Can’t Do
      6. What Is Ajax?
      7. The Snap-Together Language
        1. Objects
        2. Properties
        3. Methods
        4. Putting the pieces together
        5. Introducing the Document Object Model
      8. Handling Events
      9. Values and Variables
        1. Operators
      10. Assignments and Comparisons
        1. Comparisons
      11. Writing JavaScript-Friendly HTML
        1. Structure, presentation, and behavior
        2. Divs and spans
        3. Classes and ids
      12. What Tools to Use?
    5. 2. Start Me Up!
      1. Where to Put Your Scripts
      2. About Functions
      3. Using External Scripts
      4. Putting Comments in Scripts
      5. Alerting the User
      6. Confirming a User’s Choice
        1. More about conditionals
      7. Prompting the User
      8. Redirecting the User with a Link
      9. Using JavaScript to Enhance Links
      10. Working with Referrer Pages
    6. 3. Language Essentials
      1. Around and Around with Loops
        1. More about loops
      2. Passing a Value to a Function
      3. Detecting Objects
      4. Working with Arrays
      5. Working with Functions That Return Values
      6. Updating Arrays
      7. Using Do/While Loops
      8. Calling Scripts Multiple Ways
      9. Using Multi-level Conditionals
      10. Handling Errors
    7. 4. Working with Images
      1. Creating Rollovers
      2. Creating More Effective Rollovers
      3. Building Three-State Rollovers
      4. Triggering Rollovers from a Link
      5. Making Multiple Links Change a Single Rollover
      6. Working with Multiple Rollovers
      7. Creating Cycling Banners
      8. Adding Links to Cycling Banners
      9. Building Wraparound Slideshows
      10. Displaying a Random Image
      11. Cycling Images with a Random Start
    8. 5. Frames, Frames, and More Frames
      1. Keeping a Page out of a Frame
      2. Forcing a Page into a Frame
      3. Forcing a Site into a Frame
      4. Setting a Target
      5. Creating and Loading a Dynamic Frame
      6. Sharing Functions between Frames
      7. Storing Information in Frames
      8. Loading Multiple Frames at Once
      9. Working with Iframes
      10. Loading Iframes with JavaScript
    9. 6. Working with Browser Windows
      1. Opening a New Window
      2. Loading Different Contents into a Window
      3. Opening Multiple Windows
      4. Opening Multiple Windows Simultaneously
      5. Updating One Window from Another
      6. Creating New Pages with JavaScript
      7. Closing a Window
      8. Opening Windows in a Specified Location
      9. Moving Windows to a Specified Location
    10. 7. Form Handling
      1. Select-and-Go Navigation
      2. Changing Menus Dynamically
      3. Making Fields Required
      4. Checking Fields against Each Other
      5. Identifying Problem Fields
      6. Putting Form Validation into Action
      7. Working with Radio Buttons
      8. Setting One Field with Another
      9. Validating Zip Codes
      10. Validating Email Addresses
    11. 8. Forms and Regular Expressions
      1. Validating an Email Address with Regular Expressions
      2. Validating a File Name
      3. Extracting Strings
      4. Formatting Strings
      5. Formatting and Sorting Strings
      6. Formatting and Validating Strings
      7. Replacing Elements using Regular Expressions
    12. 9. Handling Events
      1. Handling Window Events
        1. The onload event
        2. The onunload event
        3. The onresize event
        4. The onmove event
        5. The onabort event
        6. The onerror event
        7. The onfocus event
        8. The onblur event
      2. Mouse Event Handling
        1. The onmousedown event
        2. The onmouseup event
        3. The onmousemove event
        4. The onmouseover event
        5. The onmouseout event
        6. The ondblclick event
        7. The onclick event
      3. Form Event Handling
        1. The onsubmit event
        2. The onreset event
        3. The onchange event
        4. The onselect event
        5. The onclick event
        6. The onblur event
        7. The onfocus event
      4. Key Event Handling
        1. The onkeydown event
        2. The onkeyup event
        3. The onkeypress event
    13. 10. JavaScript and Cookies
      1. Baking Your First Cookie
      2. Reading a Cookie
      3. Showing Your Cookies
      4. Using Cookies as Counters
      5. Deleting Cookies
      6. Handling Multiple Cookies
      7. Displaying “New to You” Messages
    14. 11. Introducing CSS
      1. Saying It with Style
      2. Styles with Class
      3. Changing Fonts with CSS
      4. Checking Your ID
      5. Distinguished Links
      6. Embedding Styles in Styles
      7. Adding Background Images
      8. Positioning Absolutely
    15. 12. Objects and the DOM
      1. About Node Manipulation
        1. DOM-2 and the W3C
        2. DOM-2 terminology
        3. DOM-3
      2. Adding Nodes
      3. Deleting Nodes
      4. Deleting Specific Nodes
      5. Inserting Nodes
      6. Replacing Nodes
    16. 13. Making Your Pages Dynamic
      1. Putting the Current Date into a Web Page
      2. Working with Days
      3. Customizing a Message for the Time of Day
      4. Displaying Dates by Time Zone
      5. Converting Military Time to A.M./P.M.
      6. Creating a Countdown
      7. Moving an Object in the Document
      8. Date Methods
    17. 14. Applied JavaScript
      1. Using Sliding Menus
      2. Adding Pull-Down Menus
      3. A Slideshow with Captions
      4. A Silly Name Generator
      5. A Bar Graph Generator
      6. Style Sheet Switcher
    18. 15. Introducing Ajax
      1. Ajax: Pinning It Down
      2. Reading Server Data
      3. Parsing Server Data
      4. Refreshing Server Data
      5. Previewing Links with Ajax
      6. Auto-Completing Form Fields
    19. 16. Ajax Toolkits
      1. Dragging and Dropping Page Elements
      2. Adding a Calendar to Your Page
      3. Adding a 2-up Calendar to Your Page
      4. Using the Container Utility
      5. Adding Animation Effects
      6. Implementing the Logger Control for Debugging
    20. 17. Bookmarklets
      1. Your First Bookmarklet
      2. Changing a Page’s Background Color
      3. Changing a Page’s Styles
      4. Web-safe Colors
      5. Word Lookups
      6. Viewing Images
      7. Displaying ISO Latin Characters
      8. Converting RGB Values to Hex
      9. Converting Values
      10. A Bookmarklet Calculator
      11. Validating Pages
    21. A. JavaScript Genealogy and Reference
      1. JavaScript Versions
        1. Netscape’s JavaScript
        2. Microsoft’s JScript
        3. AOL
      2. ECMAScript
      3. Browsers and JavaScript
      4. Object Flowchart
      5. The Big Object Table
    22. B. JavaScript Reserved Words
    23. C. Cascading Style Sheets Reference
    24. D. Where to Learn More
      1. Finding Help on the Web
        1. Mozilla sites
        2. Core JavaScript Guide 1.5
        3. Core JavaScript Reference 1.5
        4. Using Web Standards in Your Web Pages
        5. Venkman, the Mozilla JavaScript debugger
        6. Other great JavaScript sites
        7. Microsoft’s Scripting Languages page
        8. Yahoo! User Interface Library
        9. Yahoo! JavaScript Developer Center
        10. Yahoo! Design Pattern Library
        11. QuirksMode
        12. Web Standards Project’s DOM Scripting Task Force
        13. Weblogs
        14. DOM Scripting: The Blog
        15. Ajaxian
        16. Yahoo! User Interface Blog
        17. JavaScript World Scripting Forums
        18. JavaScript Usenet Newsgroup
      2. Books
        1. JavaScript, The Definitive Guide
        2. JavaScript & DHTML Cookbook
        3. The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks
        4. Ajax in Action
        5. ppk on JavaScript
        6. Head Rush Ajax

    Product information

    • Title: JavaScript and Ajax for the Web, Sixth Edition: Visual QuickStart Guide
    • Author(s): Tom Negrino, Dori Smith
    • Release date: August 2006
    • Publisher(s): Peachpit Press
    • ISBN: 9780321430328