Hour 17. Creating a Simple Ajax Library
What You’ll Learn in This Hour
• How to build a simple, reusable Ajax library
• Including the library in your application
• Returning text data
• Using XML
In this hour you learn how to encapsulate some of the techniques you learned in Hour 16, “Introducing Ajax,” into a small JavaScript library that you can use in your applications.
An Ajax Library
Through the code examples you studied in Hour 16, you learned a number of JavaScript code techniques for implementing the various parts of an Ajax application. Among those methods are
• A method for generating an instance of the XMLHttpRequest
object, which works across the range of currently popular browsers
• Routines for building and sending GET
and POST ...
Get Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.