Learning Ajax in 5 Min Quick Clear Concepts

Learning ajax is good thing but sometime it's look like complex and hassle for beginners, you can get lot's of tutorial in single search on Google but instead of all the tutorials I'm going to share very quick and easiest way to learn ajax in 5 min and it can also helps you to clear your doubt. I'm sharing tutorial of ajax using jquery so everything will be according to this.

Learning Ajax in 5 Min
Learning Ajax in 5 Min

Ajax Demo


Ajax :  Asynchronous JavaScript and XML. It's not a new programming language but a new way to use existing standards. It's helps to load specific part of web page without reloading the whole page.

State Of Ajax: Ajax performance basically based on below rules-
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is read

You should remember Ajax send request in xmlhttprequestobject , and this is main reason behind working to load required content only.

How to implement Ajax - Core Concept:

Ajax request can done via format $get or $post ,  let's see how it works-

How to implement ajax core logic
How to implement ajax core logic

As above image first we use method ($post) after that create variable (username) and store in another variable (name) give logic or data file name (processes.php) and finally set id(#a) where you want to display response result.

Learning Ajax Quick - Example:

First we create a simple index.php and process.php as below:

Now you can see what exactly I'm doing, first I make ajax request from process.php by using fruit name and displaying result in a div id "a" .

Everything is very handy, read above document carefully and do self. I think it will helps you lot if you are beginner let me know if you have any question.

Note: I'm not a teacher or trainer by profession but I tried to do good as I know, so you can say freely if I have wrong in any point. Your comment will appreciate me.

Himanshu is a young engineer living in India. Currently working at Cognizant as a Senior Engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: www.himstar.info : "Open Source. Millions of open minds can't be wrong!

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar

We are India’s largest Startup Community

We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page