Product Overview
Build Your Own AJAX Web Applications
Table Of Contents
- Here’s a look at the table of contents:
- AJAX: the Overview
- AJAX Web Applications
- The Bad Old Days
- Prehistoric AJAX
- What Makes AJAX Cool
- AJAX Technologies
- Data Exchange and Markup: XML
- W3C Document Object Model
- Presentation: CSS
- Communication:
XMLHttpRequest - Putting it All Together: JavaScript
- Summary
- AJAX Web Applications
- Basic XMLHttpRequest
- A Simple AJAX Library
- Starting our
AjaxClass - Creating an
XMLHttpRequestObject - Sending a Request
- Processing the Response
- Aborting the Request
- Wrapping it Up
- Example: a Simple Test Page
- Starting our
- Example: a Simple AJAX App
- Laying the Foundations
- Handling the Result with
showPoll - Starting the Process Over Again
- Full Example Code
- Running the App
- Further Reading
- JavaScript’s Object Model
- XMLHttpRequest
- Summary
- A Simple AJAX Library
- The “A” in AJAX
- Planned Application Enhancements
- Organizing the Code
- Loss of Scope with
setTimeout - Creating the Monitor Object
- Loss of Scope with
- Configuring and Initializing our Application
- Setting Up the UI
- The
toggleButtonMethod - The
toggleStatusMessageMethod - Checking your Work In Progress
- The
- Polling the Server
- Handling Timeouts
- The Response Times Bar Graph
- The Running List in
pollArray - Displaying the Results
- Stopping the Application
- The Running List in
- Status Notifications
- The Status Animation
- Setting Up
Status - Internet Explorer Memory Leaks
- The
displayOpacityMethod - Running the Animation
- Styling the Monitor
- Summary
- AJAX and POST Requests
- Review: Sending Data with
GET - Sending Data with
POST- A Quick Form
POST - Using
formData2QueryString
- A Quick Form
- An Application Login
- Accessibility and Backward Compatibility
- Markup and CSS
- Creating the
LoginClass - Setting it Up with
init - Setting the Login Prompt
- Ensuring Valid Input
- Submitting the Form Data
- Processing the Submission
- Showing Processing Status
- Handling the Server Response
- Dealing with Login Failures
- AJAX and Screen Readers
- Thinking “Linearly”
- Skip Navigation Links
- Notification for Dynamic Content
- Testing in Multiple Readers
- The Screen Reader Code
- Setting Up Notification
- Showing Notifications
- Enabling the Submit Button
- Adding Instructions to a Form Element
- Further Reading
- Summary
- Review: Sending Data with
- Broader AJAX with Edit-in-place
- Page Markup
- Accessibility and Backward Compatibility
- The
BlogClass - The
initMethod - Edit-in-place
- Editing an Entry
- The
getSrcElemMethod - Getting the Entry’s ID
- Changing the State
- Turning on Editable State
- Enabling and Disabling Other Input
- Returning to Display State
- The
- Saving Changes
- The Status Animation
- Starting the Animation
- The
doStatusAnimMethod
- The Fake Back-end Page
- Using YAML
- The PHP Code
- Response Examples
- Parsing YAML in JavaScript
- Handling the Response
- Stopping the Status Animation
- Cleaning Up with
stopReset
- Cleaning Up with
- Adding a New Entry
- Adding the New Entry
divs - Canceling the New Entry
- The Placeholder ID
- Adding the New Entry
- Future Enhancements
- Loading Existing Entries
- Concurrency and Locking
- Errors and Timeouts
- Summary
- Page Markup
- Web Services and Slide-and-hide
- Slide-and-hide Window
- Web Services: an Overview
- APIs and Protocols
- REST
- XML-RPC
- SOAP
- Network-centric vs Application-centric
- Amazon Web Services Client
- Amazon Web Services Accounts
- Amazon E-Commerce Service
- The
ClientClass- Initial Setup
- Cross-site AJAX
XMLHttpRequestand Security- An AJAX Relay
- The Proxy Script
- Sending the Request to Amazon Web Services
- Getting the Search Text
- Sending the Request
- Handling the Results from Amazon
- Using
xml2ObjArray
- Using
- Formatting the Results
- Performing the Slide-and-hide
- The Slide-and-hide Effect
- AJAX Fat-client Code
- Legacy Browsers and Accessibility
- Usability: the Back Button Problem
- Debugging Client-side AJAX
- Further Reading
- Cross-site Scripting (XSS)
- Mashups
- Summary
- More Web Services and a Back Button
- The Search Application
- Accessibility and Backward Compatibility
- Fixing the Back Button
- Setting Up the
SearchClass - The
initMethod- Disabling and Enabling Buttons
- Enabling Search
- The
submitSearchMethod- Passing to the Proxy Script
- Submitting the Search
- The Proxy Script
- Requirements
- Initial Setup
- Amazon Web Services
- Printing the Response
- Google Web APIs
- Using a SOAP Library
- The eBay Platform
- A Few Hurdles
- The Code
- Testing the Proxy Script
- Handling the Results
- Amazon
- eBay
- Displaying the Results
- Fallback for Non-JavaScript Browsers
- Screen Reader Code
- Alerting Users to Page Changes
- The Back Button Problem
- The Two Options
SearchHistoryClass- Adding to the History
- Navigating the History
- Displaying the History Entry
- Building your own Back Button
- Adding the Buttons
- Using the Browser’s Back Button
- Using the Location Hash
- Setting Up the Fix
- Setting the Hash
- Watching the Hash
- Displaying the Entry
- Decisions, Decisions
- Search App Enhancements
- Paging
- History Menu
- Further Reading
- Apache2 and OpenSSL on Linux
- Apache2 and OpenSSL on Windows
- WSDL
- Summary
- The Search Application
- Drag and Drop with AJAX Chess
- AJAX Chess
- Problems to Solve
- The
ChessClass - Starting the Application
- Setting Up the Board
- The Status Panel
- Loading a Game
- Using JSON
- Encoding an Object with JSON
- Decoding JSON Strings
- Displaying Game State
- The
handleLoadGameMethod - The
displayGameMethod
- The
- Global Event Handlers
- Going Global
- Handling Mouse Clicks
- Moving Pieces
- The
mousemoveHandler - The
mouseupHandler
- The
- The
DraggableClass- The Click Offset
- Viewport Positions and Board Positions
- The
moveMethod - The
dropMethod
- The
doMoveMethod- Making a Backup
- Error Checking
- Aborting the Move on Error
- Saving the Move
- The
handleMoveMethod - Polling for Server State
- Wiping the Board
- AJAX Chess Back End
- Future Enhancements
- Summary
- AJAX Chess
- A. AJAX Toolkits
- Index
Instant Download!
This title available in Adobe PDF format only





