Slide 1
Excellent Education Program
Innovative Methods of Teaching

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient.

Slide 2
Learning Through Play
Devoted to the Early Education

Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.

Slide 2
Learning Through Play
Devoted to the Early Education

Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.

Slide 2
Learning Through Play
Devoted to the Early Education

Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.

Slide 2
Learning Through Play
Devoted to the Early Education

Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.

Slide 3
Learning Through Play
Find a Class for your Children

Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis.

previous arrow
next arrow

AJAX Crash Course

Spread the Knowledge

What is AJAX ?

  • Asynchronous Javascript & XML
  • Set of web technologies
  • Send & receive data asynchronously
  • Does not interfere with current web page
  • JSON has replaced XML for the most part

Why XmlHttpRequest (XHR) Object is Used ?

  • API in the form of an object
  • Provided by the browser’s JS environment
  • Methods transfer data between client/server
  • Can be used with other protocols than HTTP
  • Can work with data other than XML (JSON, plain text)

How to retrieve data from sample.txt files through AJAX?

First of all, you should create an ajax1.html and one sample.txt file. then copy and paste the below codes to view the result. for below code testing. place the file in htdocs folder of xampp and open URL like this: http://localhost/ajax/ajax1.html

ajax1.html

sample.txt

How to retrieve data from json files through AJAX?

there are some example code for this. so you can check out below:

ajax2.html

users.json

How to retrieve data from external API through AJAX?

please look the codes of ajax3.html and url of external source i.e : https://api.github.com/users

How to retrieve data from database through AJAX?

users.php

there are 4 examples explained above for retrieving data from different locations by the help of Ajax. so this example are very easy to understand and apply it to your project easily. so if you hava any confusion then watch this video: Link .

Thanks for supporting us. if you like this blog then share with your friends.

Chandan Kumar
Follow Me: