O'Reilly logo

JavaScript and JSON Essentials by Sai Srinivas Sriparasa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making your first AJAX call

Now that we have an active JSON data feed, it is about time to make our first AJAX call. We will look at two approaches of making an AJAX call; these approaches come from different periods in time. The first approach will use basic JavaScript so that we understand what happens behind the scenes when an AJAX call is made. Once we understand the concept of AJAX, we will use a popular JavaScript library to make the same AJAX call but with simpler code. Let's take a look at our first approach using basic JavaScript:

Making your first AJAX call

We will begin with our basic index.html file that loads an external JavaScript file. This JavaScript file performs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required