In JavaScript, to build an Ajax application: First, create an XMLHttpRequest object. Then, open a URL. The next step is to send the request. This is done via the send method of the XMLHttpRequest object, as follows:
objXHR.send(null);
The send method accepts one argument. If the open method’s HTTP retrieval argument is POST, the argument should contain the form data that needs to be send to the server. If the open method’s HTTP retrieval argument is GET, simply send null.
So what is the next step after the XHR has sent a request? If the request is asynchronous, a listener is needed to know when the request is complete. I will cover this in the next post in my Ajax series.