03 - Creating and sending XMLHttpRequest

Creating and sending XMLHttpRequest

For exchanging information between a webpage and a server, you use a XMLHttpRequest object. And as mentioned before, this will allow us to update different parts of a web page without having to reload the entire web page.

i.e.
xmlHTTPRequest = new XMLHttpRequest();

Once you have your XMLHttpRequest object you can now exchange information with the server, to do this you will use two methods from the object: