Home arrow JavaScript arrow Learning AJAX
JAVASCRIPT

Learning AJAX


This is a two-part article. In these two parts I'll try to describe what AJAX is, and how to use AJAX in PHP and JSP. Later we will use some advanced JSP tag libraries to make cool AJAX-based web applications.

Author Info:
By: Mamun Zaman
Rating: 4 stars4 stars4 stars4 stars4 stars / 27
August 20, 2007
TABLE OF CONTENTS:
  1. · Learning AJAX
  2. · The XMLHttpRequest Object
  3. · The Complete File
  4. · A Simple Example

print this article
SEARCH DEVARTICLES

Learning AJAX
(Page 1 of 4 )

Please remember, AJAX is not a new programming language, so you don't have to learn anything new. AJAX involves just using the existing standards (JavaScript and XML) in a different way. AJAX became popular because of Google in 2005. AJAX becomes a common ingredient in web 2.0-based web applications.

Why do we need AJAX? Often web-based applications are not as user-friendly as desktop applications. Using AJAX, we can create a feature-rich and easy-to-use graphical user interface for web applications. AJAX is supported by most of the web browsers available today.

Using AJAX technology we can get information from a server in the background without reloading the web page. AJAX uses HTTP requests for this. With AJAX, JavaScript communicates directly with the server, using an XMLHttpRequest object. This object makes XML requests over HTTP protocol. After getting the response from the server, new information can be placed in the current web page without reloading it. This XMLHttpRequest object is supported in Internet Explorer 5.0+, Safari 1.2, Mozilla 1.0 / Firefox, Opera 8+, and Netscape 7.

First we need to create an XMLHttpRequest object. Then using this object, we will request a web page from the server. JavaScript will then monitor the change of state of the request. If the request is complete and the response is successful, then the content from the web page requested will be returned as the response. This response can be in either of two formats, String or XML. Then we can use the response in your web pages. Next we will go into these steps in detail. 


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials