|
| Total Answers and Comments: 4 |
Last Update: August 18, 2008 Asked by: RajivPrasad |
|
| | |
|
Submitted by: innovativesparkle AJAX - Asynchronous Java Script AND XML. Using AJAX your Java script can directly communicate with server.
AJAX use XMLHttpRequest Object to communicate with Server..
Now It Works..
XMLHttpRequest Object have three Different Properties.
1) OnReadyStateChangePropert - After Request to Server You need a Function to store the Response from Server.
xmlHttp.onreadystatechange = function (){
}
2) ReadyState = Using This Propert you can Check the Response State.
ReadyState = 0 It Means Request Initialized ReadyState = 1 It Means Request set up ReadyState = 2 It Means Request sent ReadyState = 3 It Means Request Progress ReadyState = 4 It Means Request Complete
3) ResponseText = Data Sent By Server will get By Response Text Property.
Steps... 1) First Check The xmlHttp Request Object Which Supports your Browser
Internet explorer -- ActiveXObject FireFox -- XmlHttpRequest Object
2) Then Use These Property
xmlHttp.onReadyStateChange = function () {
if (xmlHttp.ReadyState == 4) { document.getelementByid.innerHtml('center') = xmlHttp.ResponseText; }
}
3)xmlHttp.open("GET","Name of Page , you are requesting",true); 4)xmlHttp.send(null);
Above answer was rated as good by the following members: sheelaForum | Go To Top
|