Level: Intermediate Jack D Herrington (jherr@pobox.com), Senior Software Engineer, Leverage Software Inc.
06 Jun 2006 Discover three Ajax data transport mechanisms (XMLHttp, script tags, and frames or iframes) and their relative strengths and weaknesses. This tutorial provides code for both the server side and the client side and explains it in detail to provide the techniques you need to put efficient Ajax controls anywhere you need them.
In this tutorial
Explore three ways to move data to and from the server: the XMLHttp method, the <script> tag method, and the frame or iframe approach. This tutorial shows you all you need to know about the critical transport piece of the Ajax puzzle that fits between the client and the server. In addition to understanding how the client requests data from the server, you'll also learn how to transport different data types. In addition to Extensible Markup Language (XML), you can move plain text, Hypertext Markup Language (HTML) pages, or JavaScript code. In this tutorial, you will: - Create the database back end for the example.
- Build a set of server-side pages that provide access to the database data.
- Build a set of pages based on
XMLHttp that use the data services.
- Build a set of pages based on iframes that use the data services.
- Build a set of pages based on
<script> tags that use the data services.
Prerequisites
This tutorial assumes a basic knowledge of XML, HTML, and the JavaScript and PHP programming languages.
System requirements
You will need JavaScript enabled in your browser. To run the examples in this tutorial, you need:
- A PHP server that has access to a server running MySQL.
- A Web browser. (The author recommends either Mozilla Firefox or Microsoft® Internet Explorer V6.)
Duration
1 hour
Formats html, pdf
|