Buying Options
Ajax Hacks
Print $29.99
Add to Cart
Print+Ebook $32.99
Add to Cart
Ebook $23.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £22.99
Add to Cart
What is this?
Description

Want to build next-generation web applications today? This book can show you how. A smart collection of 80 insider tips and tricks, Ajax Hacks covers the finer points of Asynchronous JavaScript and XML, or Ajax as it's known. Learn leading-edge web development tasks like how to display Weather.com data, scrape stock quotes, fetch postal codes, and much, much more.

Full Description
Table of Contents
  1. Chapter 1 Ajax Basics

    1. It’s Not a Floor Wax

    2. Handle with Care

    3. XMLHttpRequest

    4. Detect Browser Compatibility with the Request Object

    5. Use the Request Object to POST Data to the Server

    6. Use Your Own Library for XMLHttpRequest

    7. Receive Data as XML

    8. Get Plain Old Strings

    9. Receive Data as a Number

    10. Receive Data in JSON Format

    11. Handle Request Object Errors

    12. Dig into the HTTP Response

    13. Generate a Styled Message with a CSS File

    14. Generate a Styled User Message on the Fly

  2. Chapter 2 Web Forms

    1. Submit Text Field or textarea Values to the Server Without a Browser Refresh

    2. Display Text Field or textarea Values Using Server Data

    3. Submit Selection-List Values to the Server Without a Round Trip

    4. Dynamically Generate a New Selection List Using Server Data

    5. Extend an Existing Selection List

    6. Submit Checkbox Values to the Server Without a Round Trip

    7. Dynamically Generate a New Checkbox Group with Server Data

    8. Populate an Existing Checkbox Group from the Server

    9. Change Unordered Lists Using an HTTP Response

    10. Submit Hidden Tag Values to a Server Component

  3. Chapter 3 Validation

    1. Validate a Text Field or textarea for Blank Fields

    2. Validate Email Syntax

    3. Validate Unique Usernames

    4. Validate Credit Card Numbers

    5. Validate Credit Card Security Codes

    6. Validate a Postal Code

  4. Chapter 4 Power Hacks for Web Developers

    1. Get Access to the Google Maps API

    2. Use the Google Maps API Request Object

    3. Use Ajax with a Google Maps and Yahoo! Maps Mash-up

    4. Display a Weather.com XML Data Feed

    5. Use Ajax with a Yahoo! Maps and GeoURL Mash-up

    6. Debug Ajax-Generated Tags in Firefox

    7. Fetch a Postal Code

    8. Create Large, Maintainable Bookmarklets

    9. Use Permanent Client-Side Storage for Ajax Applications

    10. Control Browser History with iframes

    11. Send Cookie Values to a Server Program

    12. Use XMLHttpRequest to Scrape an Energy Price from a Web Page

    13. Send an Email with XMLHttpRequest

    14. Find the Browser’s Locale Information

    15. Create an RSS Feed Reader

  5. Chapter 5 Direct Web Remoting (DWR)for Java Jocks

    1. Integrate DWR into Your Java Web Application

    2. Use DWR to Populate a Selection List from a Java Array

    3. Use DWR to Create a Selection List from a Java Map

    4. Display the Keys/Values from a Java HashMap on a Web Page

    5. Use DWR to Populate an Ordered List from a Java Array

    6. Access a Custom Java Object with JavaScript

    7. Call a Built-in Java Object from JavaScript Using DWR

  6. Chapter 6 Hack Ajax with the Prototype and Rico Libraries

    1. Use Prototype’s Ajax Tools with Your Application

    2. Update an HTML Element’s Content from the Server

    3. Create Observers for Web Page Fields

    4. Use Rico to Update Several Elements with One Ajax Response

    5. Create a Drag-and-Drop Bookstore

  7. Chapter 7 Work with Ajax and Ruby on Rails

    1. Sensible MVC

    2. Install Ruby on Rails

    3. Monitor Remote Calls with Rails

    4. Make Your JavaScript Available to Rails Applications

    5. Dynamically Generate a Selection List in a Rails Template

    6. Find Out Whether Ajax Is Calling in the Request

    7. Dynamically Generate a Selection List Using Database Data

    8. Periodically Make a Remote Call

    9. Dynamically View Request Information for XMLHttpRequest

  8. Chapter 8 Savor the script.aculo.us JavaScript Library

    1. Integrate script.aculo.us Visual Effects with an Ajax Application

    2. Create a Login Box That Shrugs Off Invalid Logins

    3. Create an Auto-Complete Field with script.aculo.us

    4. Create an In-Place Editor Field

    5. Create a Web Form That Disappears When Submitted

  9. Chapter 9 Options and Efficiencies

    1. Fix the Browser Back Button in Ajax Applications

    2. Handle Bookmarks and Back Buttons with RSH

    3. Set a Time Limit for the HTTP Request

    4. Improve Maintainability, Performance, and Reliability for Large JavaScript Applications

    5. Obfuscate JavaScript and Ajax Code

    6. Use a Dynamic script Tag to Make Web Services Requests

    7. Configure Apache to Deal with Cross-Domain Issues

    8. Run a Search Engine Inside Your Browser

    9. Use Declarative Markup Instead of Script via XForms

    10. Build a Client-Side Cache

    11. Create an Auto-Complete Field

    12. Dynamically Display More Information About a Topic

    13. Use Strings and Arrays to Dynamically Generate HTML

    View Full Table of Contents
    Product Details
    Title:
    Ajax Hacks
    By:
    Bruce W. Perry
    Publisher:
    O'Reilly Media
    Formats:
    • Print
    • Ebook
    • Safari Books Online
    Print Release:
    March 2006
    Ebook Release:
    February 2009
    Pages:
    448
    Print ISBN:
    978-0-596-10169-5
    | ISBN 10:
    0-596-10169-4
    Ebook ISBN:
    978-0-596-10594-5
    | ISBN 10:
    0-596-10594-0
    Customer Reviews
    About the Author
    1. Bruce W. Perry

      Bruce Perry is an independent Java software developer and writer. Since 1996, he has developed web applications and databases for various nonprofits, design and marketing firms, and ad agencies. When not hacking or writing, he loves cycling and climbing mountains in the U.S. and Switzerland. He lives in Massachusetts with his wife Stacy LeBaron, daughter Rachel, and son Scott.

      View Bruce W. Perry's full profile page.

    Colophon

    The image on the cover of Ajax Hacks is ping pong paddles. Ping pong originated in Victorian England, played in the homes of the upper class, who would use everyday household objects to create an indoor tennis "court." A row of books, for instance, would serve as a net, the top of a champagne cork as a ball, and cigar box tops as paddles. Looking to capitalize on the popularity of this "table tennis" game, manufacturers began selling small paddles constructed of wooden frames and parchment paper. The sound that this early equipment made gave table tennis the name ping pong, which was first trademarked in 1901. More innovations came in the early 1900s, when players began using the modern equipment of celluloid balls and wooden paddles covered in stippled rubber. Around the same time, organized tournaments began to spring up around England, and soon after that, the game spread throughout the world.

    Ping pong was introduced as an Olympic game in 1988. The incredible speed and accuracy of modern players made the game difficult to follow on television. In an effort to make the game more watchable, in 2000, the International Table Tennis Association slowed down ping pong by introducing larger balls and shortened the length of the games by decreasing the winning score from 21 to 11.

    The cover image is taken from http://www.gettyimages.com. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Helvetica Neue Condensed; and the code font is LucasFont's TheSans Mono Condensed.

    • Book cover of Ajax Hacks