In this tutorial, I will use an ajax framework to demonstrate the power of ajax. I except that the reader has basic knowledge of html and has even little bit of experience with programming. Instead of showing the stuff in the javascript that makes eveyrthing happen, I want you to first see it all happen, and even do it yourself, then I will introduce javascript object called XMLHttpRequest which makes this possible. In the second part of this tutorial, I want to emphasize on the difference between regular javascript, and what makes Ajax so special.
Prototype Based Example
1. Download the prototype framework. { http://prototype.conio.net/ }
2. For this tutorial, create a new folder, and put the prototype.js in that folder. (I named mine AjaxTutorial1)
3. Create a text file called ajax_data.txt , and type(or copy and paste) into the file
This text was fetched using Ajax.
Save the text file.
4. Create a new blank html file (ajaxtest1.html) , and open it up in notepad or as I recomemnd Html-Kit. (http://chami.com). First of all, we want to load the prototype.js.