go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  How does AJAX work?
 
Subject: How does AJAX work?
Author: WebSpider
In response to: What's the big deal to use AJAX?
Posted on: 11/10/2009 10:21:39 PM

The keystone of AJAX is the XMLHttpRequest object (IE5 and IE6 uses ActiveXObject).

By using the XMLHttpRequest object, your JavaScript communicates directly with the server for data and asynchronously proceeds with other tasks while waiting for the response from the server.


 

> On 11/10/2009 10:19:59 PM WebSpider wrote:



It's all about user-friendly.

Without AJAX, to get or send information from/to a database or a file on the server with traditional JavaScript, your user will have to trigger certain action like clicking the "Submit" button to send/get the information, wait for the server to respond, then a new page will load with the results. Because the server returns a new page each time the user submits input, traditional web applications can run slowly and tend to be less user-friendly.

With AJAX, your JavaScript communicates directly with the server, a web page can make a request to, and get a response from a web server - without reloading the page. The user can stay on the same page without noticing that scripts request pages, or send data to a server in the background.





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.