Ajax in Javascript

There are many ways but i prefer the standard way because this is how other libraries are doing inside their black box. I call this as XHR way. XHR stands for XMLHttpRequest.

Making the ajax call in prototype

in jQuery

Advantage of these calls are

  • No need to create your own XHR object.
  • Use high-level, meaningful callbacks rather than onreadystatechange
  • Sensible defaults provided for all the options you don’t want to specify yourself

If you have any doubt please write back to me through comments.


Leave a Reply

Your email address will not be published. Required fields are marked *