• Thursday , 4 June 2020

Asynchronous JavaScript #2 – AJAX Requests

Code Canyon



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

3d Ocean

Related Posts

39 Comments

  1. Justin Dequillo
    September 6, 2017 at 08:04

    I'm following your tutorials bro , your the best haha . can you make some tutorials about php & laravel . thanks a lot …

  2. kevin george
    September 6, 2017 at 08:04

    This is awesome πŸ™‚ For the first time i understand what's actually going on !

  3. Haseeb Khilji
    September 6, 2017 at 08:04

    This series is probably the best explanation of async I've come across. Thank you so much!

  4. ZE NEWZ
    September 6, 2017 at 08:04

    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

  5. Meonit Elexdee
    September 6, 2017 at 08:04

    the course link is actually not correct. it goes to some different stuff.
    You use Atom, not Brackes as you say in the description.

  6. Mathspy Terabithian
    September 6, 2017 at 08:04

    You know the best part is that I never really understood the XMLHttpRequest thing and always just did it with jQuery until today, I have no idea how you explain things so damn well. Thank you!

  7. Shubham Mittal
    September 6, 2017 at 08:04

    By far the best explanation on the planet. Thanks a ton .

  8. Dashiel Neimark
    September 6, 2017 at 08:04

    Is it redundant to check readyState == 4 && status == 200? Could a status ever be 200 if the request was not completed?

  9. Radel Gratereaux Gautreaux
    September 6, 2017 at 08:04

    subscribed! your content is great. Please keep up the good work!

  10. Alexandre Morino
    September 6, 2017 at 08:04

    Excellent! Thanks!

  11. Kali 33
    September 6, 2017 at 08:04

    What a great explanation! Thanks dude πŸ˜‡

  12. Jacolby Green
    September 6, 2017 at 08:04

    Even thought I think I have a good idea of how async code works, I love watching the video's that you guys put out. They are really great!

  13. Sufferer and Witness
    September 6, 2017 at 08:04

    awesome. looking forward for more advanced topics on JS

  14. art rocks
    September 6, 2017 at 08:04

    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

  15. Respo Theme
    September 6, 2017 at 08:04

    I can only give you one thumbs up :(. Please keep making awesome tutorials like this

  16. Richard Blackdog
    September 6, 2017 at 08:04

    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.

  17. kidconcept
    September 6, 2017 at 08:04

    Really well done, thanks!

  18. Christopher Parker
    September 6, 2017 at 08:04

    Love the tutorials. Information is always perfectly presented for any level of coder. Any plans on a object oriented php, or maybe just php for beginners tutorial?

  19. Srinath Chandra
    September 6, 2017 at 08:04

    Really you are superb man…i learn a lot of things…..

  20. Anastasia0150
    September 6, 2017 at 08:04

    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.

  21. domjanzsoo
    September 6, 2017 at 08:04

    Good tutorial , well done. My ajax request is not going until the step 4. It looks it's stucked at 3.What could be the reason of it?

  22. Mark Cuevas
    September 6, 2017 at 08:04

    Beautifully explained. Thank you!

  23. Mostafa Shami
    September 6, 2017 at 08:04

    what the program name

  24. henok-micrometre micrometre
    September 6, 2017 at 08:04

    great work thanks

  25. Felipe Arana
    September 6, 2017 at 08:04

    you're my god damn hero

  26. Jerry Webster
    September 6, 2017 at 08:04

    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.

  27. Mahmoud Zakria
    September 6, 2017 at 08:04

    I've never imagined that ajax is that so easy !!!
    Thank you ninjaaa

  28. Lazlow Carmichael
    September 6, 2017 at 08:04

    This series is probably the best explanation of async I've come across. Thanks so much.

  29. Jeremy Hall
    September 6, 2017 at 08:04

    great video! The logging to the console part is new to me, I tried to get chrome to show me what it was showing you. I couldnt seem to, how are you doing that?

  30. amr ayoub
    September 6, 2017 at 08:04

    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.

  31. PaweΕ‚ Er.
    September 6, 2017 at 08:04

    can I get just a particular fragment of JSON file with JS or it always returns full text of JSON file and I need PHP to do this?

  32. justkamil com
    September 6, 2017 at 08:04

    Hi what exactly is JSON ? Did you say something about it before ?

  33. Kimon
    September 6, 2017 at 08:04

    Holy Beard of Zeus thank you so much for this! You just alleviated some immense frustration.

  34. Carnaru Valentin
    September 6, 2017 at 08:04

    When are you using JSON.stringify() vs. JSON.parse()?

  35. iJourney
    September 6, 2017 at 08:04

    awesome!! extremely glad to have found this channel!

  36. Omarwali Jones
    September 6, 2017 at 08:04

    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!

  37. Guseyn Gadirov
    September 6, 2017 at 08:04

    This guy is simply awesome

  38. Trung PhαΊ‘m
    September 6, 2017 at 08:04

    Really easy to understand.. Thanks guy!

Leave A Comment

You must be logged in to post a comment.