AJAX (Asyncronous JavaScript and XML)

AJAX (Asyncronous JavaScript and XML) AJAX stands for Asynchronous JAvascript and XML in AJAX, we can make requests tyo change the web page contents by small parts and not the complete web page. The class is XMLHTTPRequest

let xml = new XMLHttpRequest();
xml.onreadystatechange = function() {
if(this.readyState  == 4 && this.status == 200) {
	document.getElemntById("demo").innerHTML = this.responseText;
}
xml.open("GET","ajax_info.txt",true);
xml.send();
}



To make an ajax call using jQuery, we can write $.ajax({ data: $(document.forms[0]).serialize(), url: "http://www.w3schools.com", method: "GET" }). success(function(response) { $("#result").html(response); }). error(function(error) { $("#result").html(error); });

Comments

Popular posts from this blog

Parallel Database design, query processing

Apache Hadoop Prerequisites and Installation

Starting with Apache Hadoop