Wednesday, August 27, 2008

What is Ajax??

Well First of all before going to learn about ajax we must know what ajax stands for........
Ajax shortly stands for "Asynchronous javascript and xml"
Ajax is there from the very beginning but made popular by Google....
Ajax is not a new technology not even a new programming language it is just a new way of using existing standards and technologies.
to do Ajax programming one must know the following...
1)HTML (mostly we use div and span tags)
2)CSS (Optional)
3)JavaScript
4)XML(Optional)
Ajax : It is a way of sending HTTP Requests to web server from JavaScript Using "XmlHttpRequest" Object .
Think about web whith out Ajax what are the other ways of sending request from web page .
1)By Clicking HyperLink Tag.
2)Clicking Submit Button.
For this kinds of requests we will see a new page will be loaded.
What if we want to load new things in to a page that was already loaded in to the browser. Here the Ajax comes in to play.
Using Ajax it is Possible to send requests to webserver from webpage in background means user will not aware of this requests.The response that comes from webserver will be inserted in to the existing (already loaded) page using javascript and html span and div tags.
Basically sending and receiving requests to and from server are handled by "XmlHttpRequest" Object .

Note:In Ajax we will never see a new page is going to loaded(No page refresh) all the things are going to happen in a single page.Simple i can say it works like a stand alone application. Most importantly browsers back button doesn't work.

No comments: