Sunday, February 14, 2010

All about Ajax and its states

Ajax (Asynchronous Javascript And XML) is used to update part of the webpage's content Asynchronously without reloading the entire page. Below are the five possible response states in Ajax
0: The request is uninitialized (before you've called open()).
1: The request is set up, but not sent (before you've called send()).
2: The request was sent and is in process (you can usually get content headers from the response at this point).
3: The request is in process; often some partial data is available from the response, but the server isn't finished with its response.
4: The response is complete; you can get the server's response and use it.