Technologies Used in AJAX

Let’s understand the different technologies used in AJAX

Technologies used in Ajax

JavaScript

  • Generally we write script language
  • The JavaScript function is called when an event in a page appear
  • The key player in the entire AJAX operation

DOM

  • Programming interface for getting to and controlling organized document
  • Show the structure of XML and HTML document

CSS

  • The clear separation for the presentation style for the content and is different programmatically by the JavaScript.

XMLHttpRequest

  • Every JavaScript object that performs asynchronous interaction with the server

Introducing XML (Ajax) and Asynchronous JavaScript Technology

  • Using the JavaScript technologies, make an HTML page can asynchronously  calls to the server from which is loaded and fetch content that may be formatted like HTML content, XML documents,  JavaScript Object Notation (JSON) or plain text.  JavaScript technology then uses the content to modify or update the HTML page of the Document Object Model (DOM). We can say the XML (Ajax) and Asynchronous JavaScript Technology has emerged recently to define this interaction model.
  • Ajax is not new because these techniques have been already available to use developers targeting and Internet Explorer on the Windows platform many years. Before the coming, JavaScript technology was known as the remote or scripting web removing. A combination of Java applets, and plug-ins, also used web developer’s hidden frames to emulate this interaction model for some time.
  • The real prediction is the output of the JavaScript technologies and XMLHttpRequest object. If this object is not detailed in the formal JavaScript technology identification, mainstream browsers support today. The basic difference CSS and JavaScript technology support among current generation of browsers.
  • The JavaScript libraries like, Prototype, Dojo, and the Yahoo User Interface Library have appear to fill in the browsers are not as easy and to consider a standard programming model. Example of Dojo, is addressing availability, international, and advanced graphics and browsers which had been thorns in the side of previous adopters of Ajax. Updates are surer to occur as the need arises.

Uses for Ajax interactions are there

Real-time form Data Validation: Form the data like, serial numbers, user IDs, coupon codes, or even special postal codes that provide server-side validation can be authorized in a form before the user submits a form. Look the Real time Form Validation for details.

Auto Completion: A special kind of portion form the data such as a mobile number, name, email address or city name may be auto completed as the user types.

Load on Demand: Client based on an event, the background data of an HTML page can fetch allowing the browser to load pages more quickly.

Effects and Sophisticated User Interface Controls: The controls like menus, trees, rich text editors, calendars, data tables and progress bars allow for better user friendly and interaction with HTML pages, without requiring the user to reload the page.

Partial Submit: Without requiring an HTML page can submit form data as needed a full page refresh.

Mashup: Using a server-side HTML page can collect data proxy or by involving an external script to mix external data with your service’s data or your application’s. Example, you can mix data or content from a third-party application.

Updated HTML DOM in Ajax Technology

References with to an element, JavaScript technology may now be used to change the element’s attributes; change element’s style properties; or add, remove, or change child elements. Mention supported to increase an element is to call document.getElementByName (“MerajAnsari”), where ‘MerajAnsari’ is the name attribute of an element shown in the HTML data.

<script type="text/javascript">
...
capacity setname(name) {
var mdiv = document.getelEmentByName("ansariMeraj");
in the event that (name == "invalid") {
mdiv.innerhtml = "<div style=\"color:yellow\">invalid User Name</ div>";
} else {
mdiv.innerhtml = "<div style=\"color:black\">valid User Name</ div>";
}
}
</script>
<body>
<div id="ansariMeraj"></div>
</body>