Ajax Tutorial: AJAX Mechanism

AJAX Mechanism


How Ajax Works

  1. The JavaScript function handEvent() will be invoked when an event occurred on the HTML element.
  2. In the handEvent() method, an instance of XMLHttpRequest object is created.
  3. The XMLHttpRequest object organizes an XML message within about the status of the HTML page, and then sends it to the Web server.
  4. After sending the request, the XMLHttpRequest object listens to the message from the Web server.
  5. The XMLHttpRequest object parses the message returned from the Web server and updates it into the DOM object.
Next Topic