First of all, let’s explain what AJAX means: Asynchronous JavaScript and XML.
Ajax will allow us to update a web page by making asynchronous calls to the web server exchanging small pieces of data; this means that we could update content of a web page without having to reload the entire page.
Asynchronous: means that the communication between the Web Browser and the Server happens with no timing requirement for the transmission.
JavaScript: is a scripting language that allows creating dynamic webpages it provides client-side scripting that can modify the looks and how the web page operates.
XML: this is the eXtensible Markup Language, designed for transport and storage of data.
xmlHTTPRequest.onreadystatechange=function() { if (xmlHTTPRequest.readyState==4 && xmlHTTPRequest.status==200) { //Execute the update of the webpage } }