>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Learn AJAX in 20 minutes - ajax pm good php work code var javascript

 
Registered tutorials: 501
Registered Users: 33128



Rating: 4.21 out of 19 votes cast


  
Category: Ajax and PHP

Learn AJAX in 20 minutes

Digg this   Post to del.icio.us

Abstract: This tutorial gives you a quick overview of the Ajax technique and illustrates how to create a simple Ajax Application using XMLHttpRequest on the client side and PHP on the server

Here is a quick overview and example of AJAX in action. Before you begin, this example will only work in FireFox. You’ll have to change few things in the JavaScript for it to work in IE. To download the files used below click here. If you don’t have PHP/Apache installed, follow the tutorial I made to install it. The example below assumes you know the basics of PHP, you can learn as you go along if you don’t. A good reference is the base PHP website.

AJAX stands for Asynchronous JavaScript and XML. Conventional web application trasmit information to and from the sever using synchronous requests. This means you fill out a form, hit submit, and get directed to a new page with new information from the server. With AJAX when submit is pressed, JavaScript will make a request to the server, interpret the results and update the current screen. In the purest sense, the user would never know that anything was even transmitted to the server.

A classic example of AJAX is Google Maps. If you havent noticed, with Google Maps you have the ability to click and drag the map. If you drag the map fast enough, you would see the new regions of the map loading in real-time. This is accomplished using AJAX.

If you click here, you’ll see a simple example of AJAX. The example performs the multiplication of two numbers. The top form performs the calculation using AJAX, while the bottom form uses standard techniques.

The Javascript that makes the example work is below. Basically an XMLHttpRequest is used to communicate with the server. Though the name may make you think you need to trasmit XML, it is not necessary (my example doesn’t). So when the function ajax_call() is executed, the already instantiated XMLHttpRequest attemps to open ajaxWork.php (with some parameters). Upon returning from the request (and assuming it was successful) the results are populated into the results input box.


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 5901
Unique Hits: 4810


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.3 0.3 2.6 2.8 102 127.2
Current 0 0 0 0 0 0
Previous 1 1 3 3 19 21
Nov 29 0 0 6 7 19 21
Nov 28 1 1 0 0 740 945
Nov 27 0 0 4 4 4 5
Nov 26 0 0 0 0 57 68
Nov 25 1 1 6 7 16 17
Nov 24 0 0 0 0 0 0
Nov 23 0 0 3 3 13 15
Nov 22 0 0 4 4 152 180
Highest 81 97 352 431 1121 1386


Script Execution Time: 15.25365 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2