Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
JavaScript AJAX XHR for beginners
Rating: 4.4 out of 5(135 ratings)
3,969 students

JavaScript AJAX XHR for beginners

Explore JavaScript AJAX how to connect to web APIs retrieve JSON data to output in your web application using JavaScript
Created byLaurence Svekis
Last updated 11/2024
English
English [Auto],

What you'll learn

  • Use AJAX to get JSON data into their web pages
  • Use XHR requests to connect to servers and APIs
  • Explore how to connect to APIs

Course content

2 sections28 lectures1h 59m total length
  • JavaScript AJAX introduction3:15

    Learn how AJAX connects to a server to retrieve data behind the scenes using JSON, XHR, and the DOM to build dynamic web content.

  • Web Developer Setup5:27

    Explore the web developer setup for beginners with Brackets editor, live preview over http, Chrome devtools, and Ajax workflows using json data and api calls.

  • JSON JavaScript Objects5:53

    Learn how JavaScript objects and JSON relate, create object literals, use dot and bracket notation to retrieve and navigate data, and build objects for multiple people.

  • Set and Get Object Data8:57

    Explore creating and updating a JavaScript object, accessing data with dot and bracket notation, and working with nested arrays toward JSON-ready structures for Ajax retrieval.

  • Source Code Lesson 30:04
  • Save as JSON4:20

    Explore the differences between JavaScript objects and JSON, validate JSON with JSON lint, and format valid JSON with double quotes, arrays, strings, numbers, and billions, while avoiding functions.

  • Source Code Lesson 40:10
  • Foreach Iterate items from Array4:36

    Iterate through the array inside a JavaScript object using forEach or a for loop, outputting items to the HTML or console and updating content as it changes.

  • Source Code Lesson 50:14
  • Xhr Request ReadyState5:30

    Learn to create an XMLHttpRequest, open and send a GET request, monitor ready states 0 to 4 and status 200, and read the response text for ajax calls.

  • Source Code Lesson 60:17
  • XHR Data Ready for Use4:09

    Track xhr progress with onreadystatechange, check for readyState four and status 200, then use responseText to display data in the page and log results.

  • Source Code Lesson 70:10
  • JSON parse and Stringify4:17

    Learn to fetch data from a web API, convert stringified JSON back into usable objects with JSON.parse, and stringify objects again with JSON.stringify to access properties like age.

  • Source Code Lesson 80:09
  • JSON data iterate content3:09

    transform a json string into an object, loop through the data, and render first name and last name into html using a dedicated output function.

  • Source Code Lesson 90:12
  • Connect to API6:21

    Learn to connect to a random user api, fetch a results array, iterate through items, and display images and data on a web page using console output and html integration.

  • Source Code Lesson 100:11
  • JavaScript AJAX Code Review4:35

    Learn to implement a button-driven ajax xhr flow to load more content, parse json, and render results from an endpoint into the page for dynamic web apps.

  • Source Code Lesson 110:14

Requirements

  • JavaScript Experience and HTML and CSS
  • You should have web development Experience

Description

Welcome to our introductory course for using AJAX - Asynchronous JavaScript And XML with JavaScript

Explore how you can use XMLHttpRequest to connect to web APIs to retrieve JSON data into your web application.  Use JavaScript to send requests, receive response content and use the response data to output into the html. 

This course covers how to make AJAX requests using the XMLHttpRequest within JavaScript.  JavaScript code knowledge is a prerequisite for the course.  Scope of this course is focused on AJAX 

Course Covers

  • Explore what XHR is and how it works

  • JavaScript Objects and how it relates to JSON data

  • Learn how to use JavaScript Object data setting and updating

  • How to save JSON and lint JSON to validate JSON data

  • Loop through content within JavaScript Arrays Objects and output content

  • What JavaScript AJAX readystate is

  • Use response data

  • Use JSON parse and stringify to convert data objects and strings

  • Explore how to use JSON data

  • Connecting to web APIs

  • Practice AJAX

You'll get friendly support in the Q&A area and all the source code available for download

This Offer Won't Last Forever

You will be amazed at how easy it can be to do some much. 
Go ahead and hit that "take this course" button to start learning the AJAX Today.  

Taught by an instructor with over 20 years of web development experience, ready to help you learn and answer any questions you may have.

What are you waiting join now to start learning AJAX, you have nothing to lose.

Who this course is for:

  • Web developers who want to practice AJAX
  • Anyone who wants to use JavaScript xHR to connect to APIs
  • Anyone who wants to learn more about XHR
  • JavaScript developers