Summary
This lesson combined many of the techniques discussed to date to produce a compact and reusable JavaScript library that can be called simply from an HTML page.
The code supports both HTTP GET and HTTP POST requests and can deal with data returned from the server as text or XML.
Using such a library allows Ajax to be introduced to web pages using relatively small additions to the HTML markup. This not only keeps the code clean and easy to read but also simplifies the addition of Ajax facilities to upgrade legacy HTML.
In Lesson 18, "Ajax 'Gotchas,'" the last lesson of Part III, we'll discuss some potential problems and pitfalls awaiting the programmer in developing Ajax applications.