Welcome to the only guidebook series that takes a visual approach to professional-level computer topics. Open the book and you'll discover step-by-step screen shots that demonstrate over 150 key Ajax techniques, including:
- Downloading data from behind the scenes
- Enabling real-time live searches
- Playing games that use Ajax
- Populating pop-up menus
- Accessing Web pages from JavaScript
- Handling menus, colors, and backgrounds
- Creating interactive mouseovers
- Updating shopping carts
- Installing Ajax frameworks
- Validating XML from the server
- Enabling auto-completion of typed terms
- Downloading images behind the scenes
"I just purchased my third Visual book (my first two are dog-eared now!) and, once again, your product has surpassed my expectations. Keep up the wonderful work!"
—Tracey Moore (Memphis, TN)
- High-resolution screen shots demonstrate each task
- Succinct explanations walk you through step by step
- Two-page lessons break big topics into bite-sized modules
- "Apply It" and "Extra" sidebars highlight useful tips
Table of Contents
HOW TO USE THIS BOOK.
1 GETTING INTO AJAX.
Get into Ajax.
Using an Ajax-Based Application.
Run a Live Search.
Autocomplete What You Type.
Modify Web Pages without Page Refreshes.
Drag and Drop with Ajax.
Get Instant Login Feedback.
Create Rich Displays with Ajax.
Create Games with Ajax.
Chat Online Using Ajax.
Download Images with Ajax.
2 CREATING AJAX USING JAVASCRIPT.
Create a Script.
View JavaScript Errors.
Handle Browser Events.
Create JavaScript Functions.
Display Results Where You Choose in a Page.
Connect HTML Buttons to JavaScript.
Display Text in Text Fields.
Pass Arguments to Functions.
Return Data from Functions.
Store Data in Variables.
Work with Operators.
Use JavaScript Operators.
Create Local Variables.
Make Choices with the if Statement.
Using Comparison Operators.
Determine Browser Type and Version.
Repeat Code Execution with the for Loop.
Handle Multiple Data Items at Once Using Arrays.
Using the while Loop.
3 WRITING AJAX CODE.
Write Ajax.
Create an XMLHttpRequest Object Using JavaScript.
Open the XMLHttpRequest Object.
Get Ready to Download.
Download Data with the XMLHttpRequest Object.
Select Relative or Absolute URLs.
Create Newer XMLHttpRequest Objects in Internet Explorer.
Start Using Server-Side Scripts.
Create XML Documents for Download.
Download XML from the Server.
Create a Function That Adds Numbers.
Extract Data from XML Elements.
Read Data Sent to the Server.
Pass Data to the Server with GET.
Pass Data to the Server with POST.
4 GETTING MORE AJAX POWER.
Create Server-Side Mouseovers.
Download JavaScript Using Ajax.
Create a Live Search Using Google Suggest.
Connect to Google Suggest.
Display the Google Suggest Results.
Read Input and Send It to the Server for Validation.
Return Validation from the Server.
Get Header Information.
Extract Specific Header Data.
Check If a Document Exists.
Use Two XMLHttpRequest Objects at the Same Time.
Create an Array of XMLHttpRequest Objects.
Handle Multiple XMLHttpRequest Requests at the Same Time.
Call a Different Domain Safely.
Debug Ajax Code.
5 CREATING AJAX APPLICATIONS.
Convert Mouse Events into a Standard Format.
Handle Mouse Down and Mouse Up Events.
Handle Mouse Move Events.
Handle Mouse Click and Double-Click Events.
Handle Mouse Enter and Leave Events.
Create a Shopping Cart Application.
Drag an HTML Element in a Shopping Cart Application.
Drop an HTML Element in a Shopping Cart Application.
Update a Shopping Cart on the Server.
Download Image Names Using Ajax.
Display Images Using Ajax and Dynamic HTML.
Create an Ajax-Driven Menu System.
Display a Menu Using Cascading Styles.
Hide a Menu Using CSS.
Read Ajax-Driven Menu Selections.
6 EXPLORING THE BASIC AJAX FRAMEWORKS.
Using Ajax Frameworks.
Create the readTextWithGet Function.
Get Text with the readTextWithGet Function.
Create the readXmlWithGet Function.
Get XML with the readXmlWithGet Function.
Create the readTextWithPost Function.
Get Text with the readTextWithPost Function.
Create the readXmlWithPost Function.
Get XML with the readXmlWithPost Function.
Install AJAXLib.
Access the Server With AJAXLib.
Download Data With AJAXLib.
Install libXmlRequest.
Access the Server with libXmlRequest.
Download Data with libXmlRequest.
7 USING MORE POWERFUL AJAX FRAMEWORKS.
Install XHConn.
Access the Server with XHConn.
Download Data with XHConn.
Install SACK.
Access the Server with SACK