AJAX In Action

This section will give you clear picture of the exact steps of AJAX operation.

Steps of AJAX Operation

  1. A client event occurs
  2. An XMLHttpRequest object is created
  3. The XMLHttpRequest object is set up.
  4. The XMLHttpRequest object makes an asynchronous request to the Webserver.
  5. Webserver returns the response.
  6. The XMLHttpRequest object calls the callback() function and processes the result.
  7. The HTML DOM is updated

Working Example of AJAX:

Here is the “result.php”