• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
AJAX Tutorial
AJAX stands for Asynchronous JavaScript And XML.AJAX is a type of programming made popular in 2005 byGoogle (with Google Suggest).AJAX is not a new programming language, but a new way touse existing standards.With AJAX you can create better, faster, and more user-friendly web applications.AJAX is based on JavaScript and HTTP requests.
AJAX Introduction
AJAX stands for Asynchronous JavaScript And XML.
What You Should Already Know
Before you continue you should have a basic understanding of the following:
HTML / XHTML
JavaScript
AJAX = Asynchronous JavaScript and XML
AJAX is not a new programming language, but a technique for creating better, faster, andmore interactive web applications.With AJAX, your JavaScript can communicate directly with the server, using theJavaScript
XMLHttpRequest
object. With this object, your JavaScript can trade datawith a web server, without reloading the page.AJAX uses asynchronous data transfer (HTTP requests) between the browser and the webserver, allowing web pages to request small bits of information from the server instead of whole pages.
 
The AJAX technique makes Internet applications smaller, faster and more user-friendly.AJAX is a browser technology independent of web server software.
AJAX is Based on Web Standards
AJAX is based on the following web standards:
JavaScript
XML
HTML
CSS
The web standards used in AJAX are well defined, and supported by all major browsers.AJAX applications are browser and platform independent.
AJAX is About Better Internet Applications
Web applications have many benefits over desktop applications; they can reach a largeraudience, they are easier to install and support, and easier to develop.However, Internet applications are not always as "rich" and user-friendly as traditionaldesktop applications.With AJAX, Internet applications can be made richer and more user-friendly.
You Can Start Using AJAX Today
There is nothing new to learn.AJAX is based on existing standards. These standards have been used by most developersfor several years.
AJAX Http Requests
AJAX Uses HTTP Requests
 
In traditional JavaScript coding, if you want to get any information from a database or afile on the server, or send user information to a server, you will have to make an HTMLform and GET or POST data to the server. The user will have to click the "Submit" buttonto send/get the information, wait for the server to respond, then a new page will load withthe results.Because the server returns a new page each time the user submits input, traditional webapplications can run slowly and tend to be less user-friendly.With AJAX, your JavaScript communicates directly with the server, through theJavaScript
XMLHttpRequest
objectWith an HTTP request, a web page can make a request to, and get a response from a webserver - without reloading the page. The user will stay on the same page, and he or shewill not notice that scripts request pages, or send data to a server in the background.
The XMLHttpRequest Object
By using the XMLHttpRequest object, a web developer can update a page with datafrom the server after the page has loaded!
AJAX was made popular in 2005 by Google (with Google Suggest).Google Suggestis using the XMLHttpRequest object to create a very dynamic webinterface: When you start typing in Google's search box, a JavaScript sends the letters off to a server and the server returns a list of suggestions.The XMLHttpRequest object is supported in Internet Explorer 5.0+, Safari 1.2, Mozilla1.0 / Firefox, Opera 8+, and Netscape 7.
AJAX Example
Your First AJAX Application
To understand how AJAX works, we will create a small AJAX application.First, we are going to create a standard HTML form with two text fields: username andtime. The username field will be filled in by the user and the time field will be filled inusing AJAX.
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...