Asynchronous JavaScript #2 – AJAX Requests




Hey all, in this asynchronous JavaScript tutorial, I’ll be showing you how we can make http / ajax requests using vanilla javascript, as well as using the $.get() method in jquery.

—– COURSE LINKS:
+ Repo – https://github.com/iamshaunjp/css-animations-playlist
+ Brackets editor – https://brackets.io/

———————————————————————————————
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage…

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

================== Social Links ==================

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source


39 responses to “Asynchronous JavaScript #2 – AJAX Requests”

  1. Dude.. you running a university here lol. Best tutorials I have ever come across … I am using to learn new skills so I can build my startup …. I will always give credits to you man

  2. This is superb work, thank you. Hope you're being rewarded for your efforts.

    I like the way you talk and explain as you code! Something so simple as "If readystate is equal to 4"… has fixed the meaning of == meaning equal in my mind, which I could not get used to before!

    Thank you again,
    Paul

  3. Great tutorial as far as the javascript goes, but I would like there to be a bit more information on how to set up the dev environment and actually run the code. I am using Atom and have the atom-live-server plugin installed, but it just opens up a browser tab listing the source code. It doesn't run anything. I know how to embed a script in an html page but the impression given by this tutorial is that you can just run the JavaScript as is.

  4. Thanks! The tutorial is very helpful;) By the way, is there a way to save a chunk of data from the request to pass it to a different API? I created a function that connects to the Google maps API but I failed to pass the data I got to connect to the Dark Sky Weather API. The function returns "undefined" every time I try to store the data from Google in a variable.

  5. Hello Ninja. I heartedly enjoyed this video. Might I say, it's one of the most pellucid lessons on javascript ajax requests on YouTube. I especially relished the lesson being first given in plain vanilla javascript before moving forth to the library. Thank you.

  6. hello , great course, i have a question
    how can i create a function If there is 5 or more ongoing requests, you have to wait until one
    of them is completed then you can process next request.
    When the response code is not 200, you need to retry 3 times. If the response code after
    retrying 3 times is still not 200 then the error function should be executed.

  7. jQuery + AJAX version of these ever coming? Specifically just using the $.ajax() method / object to make get and post request successfully? Pretty familiar with get but post is still sort of foreign as you need a backend(server) set up to handle them I believe. Some tuts where you set up a quick and dirty server using express and node (because keep everything javascript why not 🙂 lol) would be great. Anyways good stuff man. I started with with your node series. Then did the vanilla js and jQuery series for some review / refresher and you make the material very easy to digest. I'm subscribed!

Leave a Reply