Doing AJAX with popular javascript libraries

| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |

As of today there are scores of ways you can use AJAX in web pages, right from the basic javascript that uses XMLHttpRequest, to some powerful javascript libraries. This article discusses ways of doing AJAX in different javascript libraries and their specialties.

The Basic

Yes, you guessed it right. Using raw javascript and the 'XMLHttpRequest' object. In my opinion anyone who ever will use AJAX, must know about this. There is an excellent tutorial on Mozilla's website here . A must read for all beginners to this technology. No matter what AJAX framework you plan to use, the underlying principal is the same.The steps involved are pretty basic:
  • Create a 'XMLHttpRequest' object.
  • Hook up a javascript function to handle the onreadystate event. This function reads the response form server and does whatever we want.
  • Send the request and wait for the response.
The article I mentioned above provides neat, easy to understand explanation along with the code.
  • Recommended for every AJAX beginner.
  • Extremely lightweight, should be considered if you don't want to add references to external javascript files. (Script can reside on same page).
| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |

Copyright (c) 2007-2019 Ashish Patil . Please read FAQ for more details.

comments powered by Disqus