|
|
|
| HOME | J2ME | Struts | AJAX | SOAP | SOA | MEDIA STREAMING | AXIS | | |
|
|
AJAX: Properties of XMLHttpRequestBack | Tutorial Home | Next There are various properties associated with XMLHttpRequest which need to be used to complete AJAX life cycle. Following are the various properties of XMLHttpRequest object
The onreadystatechange Property onreadystatechange property of XMLHttpRequest needs to be set before the request is sent to the server. The function set to this property acts as the event handler function when the state of the request changes. The various states of the request are
When ever there is change in the state the function set for onreadystatechange property is invoked xmlHttp=CreateXmlHttpObject(); readyState Property readyState property of XMLHttpRequest stores various states of the request mention in the above section. Each time this property changes the function set for onreadystatechange property is invoked. Given below is the various states and their respective values Here are the possible values for the readyState property:
This property is usually checked in the function set for onreadystatechange property for processing the request xmlHttp=CreateXmlHttpObject();
responseText Property responseText Property holds the data sent by server in text format. xmlHttp=CreateXmlHttpObject(); responseXML Property responseXML Property holds the data sent by server in XML format. xmlHttp=CreateXmlHttpObject(); status Property This property holds the HTTP status codes from the server. The most popularly
used status codes are
Normally we dont need to handle all these status codes unless your
requirements need to handle them. All the status codes other than 200
can assumed to be errors. This property holds the HTTP status message from the server. statusText
property is related to status property.
xmlHttp=CreateXmlHttpObject(); Back | Tutorial Home | Next site comments powered by Disqus |
|
| toolbar powered by Conduit |
|
| Copyright © 2009. All rights reserved | Terms and Conditions | About | Contact | Feed Back | |