Ajax stands for Asynchronous JavaScript and XML. And I'll tell you what are the technologies used by ajax. The word "asynchronous" means that the user need not wait until the server replies.
AJAX is not a programming or script language, no new invention, and no separate Web service, module, or plug-in. It is a group of inter-related technologies like javascript, dom, XML, HTML, CSS, etc.
AJAX was made popular in 2005 by Google, with Google Suggest. It is an algorithm with 'old' technologies similar to the Dynamic Html.
Ajax allows creating server connections in the background while a user is interacting with a Web front-end. These connections can be created asynchronously, which means that the user need not wait until the server replies.
Technologies are being used in Ajax
Here is the technologies are being used in Ajax. Let's check all these thing to know more about What is ajax? and How it works?
WordPress Automatic Plugin update
HTML/XHTML and CSS:
XHTML stands for EXtensible HyperText Markup Language. These technologies are used for displaying content and style. It is mainly used for presentation. CSS is independent of HTML and can be used with any XML-based markup language.
DOM:
The browser creates a Document Object Model (DOM) of the page. It is used for dynamic display and interaction with data.
Javascript:
JavaScript is the programming language of HTML and the Web. It is used to bring the above technologies together. It used for Client-side validation and validates user input in an HTML form before sending the data to a server.
XMLHttpRequest:
For asynchronous communication between client and server. For more visit the next page. The XMLHttpRequest object can be used to request data from a web server.
XML or JSON:
JSON and XML are hierarchical - values within values. Both JSON and XML can be fetched with an XMLHttpRequest For carrying data to and from the server. JSON (Javascript Object Notation) is like XML but short and faster than XML.
ASP or JSP:
JSP (Java Server Pages) and ASP (Active Server Pages) are two of the commonly used server-side scripting languages. JSP have access to the entire family of Java APIs, including the JDBC API to access enterprise databases.
Examples
Let’s get start with a basic JQuery Ajax GET request:
$.ajax({
type: "GET",
url: 'server.php',
success: function(data){
alert(data);
},
error: function (Status, errorThrown) {
}
});
Check this URL to get the complete example for Ajax.
jQuery ajax GET example with PHP
Final create your index page to call your Ajax:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JQuery Ajax POST Example</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: 'server_ajax.php',
data: {action: 'get_record'},
success: function(data){
$("#result").append(data);
}
});
});
</script>
</head>
<body>
<div id="result"></div>
</body>
</html>
Cheers.
Write a comment