AJAX Crash Course (Vanilla JavaScript)

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024

Комментарии • 836

  • @TraversyMedia
    @TraversyMedia  7 лет назад +299

    Around 8:00 I said "videos". I meant to say "files". Everything is in this one video. I did not get to the libraries but we will do that in a separate video. Hope you guys enjoy!

    • @saadmahbub8787
      @saadmahbub8787 7 лет назад +3

      Can you do a video on isotope and masonry please ? will be really helpful ,thanks :)

    • @ezeamaka
      @ezeamaka 7 лет назад +2

      Another great tutorial again as usual. Please you promised to make a tutorial for beginners on how to create and upload website to the sever!!! Am still waiting - Thanks

    • @priyaranjan1733
      @priyaranjan1733 7 лет назад

      Thanks a lot , Could you make some video for Javascript Flavours, like vanilla :P

    • @ethashamuddinmohammed1255
      @ethashamuddinmohammed1255 4 года назад

      Try GoLang instead of NodeJS. You have a good thought process

    • @FordExplorer-rm6ew
      @FordExplorer-rm6ew 4 года назад +1

      How do we use ajax in production without CORS errors?
      Github pages?
      Heroku?
      Netlify?
      Which of these will work?

  • @dhandayalprasad2267
    @dhandayalprasad2267 4 года назад +26

    wow. He explains very complicated stuffs so smoothly.

    • @dunzek943
      @dunzek943 4 года назад +1

      Of course man, this is Brad Traversy you're talking about

  • @danielrgh
    @danielrgh 3 года назад

    Incredible Course After 4 years, good job

  • @saumitrakulkarni583
    @saumitrakulkarni583 4 года назад

    liked your video soo much.. its good for begginers.. and i'm also a TWD fan ! :)

  • @AdamRasheed
    @AdamRasheed 7 лет назад +45

    Can you make one for ES6?

  • @nonchalant8473
    @nonchalant8473 6 лет назад

    Great tutorial Brad. Thanks

  • @StevenMcGregor
    @StevenMcGregor 7 лет назад

    Excellent, thanks Brad. What changes would I need to make to use PDO instead of mysqli? The connection is not a problem, just the other stuff.

  • @kerwinroig3147
    @kerwinroig3147 2 года назад

    Thanks for your HT. I have a question. I had to place send just after Open(); can you explain why? That was a problem I ran into; is it the current way to use?

  • @Charizm0
    @Charizm0 7 лет назад +2

    Please do a video on hosting multiple django projects with gunicorn nginx for reverse proxy.

  • @sonoftroy8572
    @sonoftroy8572 5 лет назад

    Hey Brad, thanks you for teaching my how to send data to a database, I’m trying to send data using 3 input fields (first name, last name, email) and it just isn’t sending correctly, what do I need to change or add in the code to get working right, thanks...

  • @yeahorightbro
    @yeahorightbro 7 лет назад +405

    I disable adblock when I watch this channel. Brad, you're a hero.

    • @TraversyMedia
      @TraversyMedia  7 лет назад +68

      Thank you very much for that :)

    • @braed6202
      @braed6202 7 лет назад +4

      I just whitelisted his channel too :)

    • @gabgab841
      @gabgab841 7 лет назад +10

      i disable adblock donate to patreon and get his udemy courses

    • @freedomfighter3686
      @freedomfighter3686 6 лет назад +2

      You mean you enabled adblock :) since disabling adblock means ads are free to come.

    • @gjuteodoro6910
      @gjuteodoro6910 6 лет назад +1

      Lol?

  • @attilakatona2137
    @attilakatona2137 7 лет назад +186

    this is the best AJAX course on the net by far Brad!

    • @TraversyMedia
      @TraversyMedia  7 лет назад +15

      Thanks

    • @TrendForJesus
      @TrendForJesus 7 лет назад

      Yes thank you brad

    • @maskman4821
      @maskman4821 6 лет назад +1

      Definitely the best ajax tutorial!

    • @dansintean6820
      @dansintean6820 6 лет назад

      better than Bucky's

    • @ililiilili3366
      @ililiilili3366 5 лет назад

      @@TraversyMedia hey, since i started front-end learning, i always wondered how do one ever connnect front end to back-end. I think i have a better idea now. i watched some parts but i understood. Will practice the content of this video later on. Thanks, dont erase it plz (LOL).

  • @sanulankaraya9997
    @sanulankaraya9997 3 года назад +63

    Every time I hear that intro music, I feel really confident.

    • @shivrajnag12
      @shivrajnag12 3 года назад +2

      It gives me similar vibes as Netflix

    • @jesusgonzalez7059
      @jesusgonzalez7059 2 года назад

      I know, right?! It makes me feel like everything is going to be okay.

  • @ErnestGWilsonII
    @ErnestGWilsonII 7 лет назад +61

    OMG Another awesome video from Traversy Media! Does he ever sleep or does he just make cool videos around-the-clock?

    • @rogeriorodrigues4210
      @rogeriorodrigues4210 6 лет назад +1

      Traversy is a true hero

    • @bialcus69
      @bialcus69 5 лет назад

      He's mr. robot

    • @amrik9614
      @amrik9614 5 лет назад

      he sleeps

    • @luckylove72
      @luckylove72 3 года назад

      Looking at how much he work he will have tough time in 50s. I already lost my spinal cord. Now I am ghost.

  • @CSCoreDecoded
    @CSCoreDecoded 2 года назад +9

    Video intro 0:00 ;
    What is AJAX 0:57 ;
    XmlHttpRequest (XHR) Object 4:06 ;
    Ways to make AJAX Call 5:07 ;
    Starting with AJAX 7:24 ;
    onreadystatechange 18:42 ;
    onprogress & onerror 22:35 ;
    AJAX Dealing with JSON 26:40 ;
    AJAX with External API 37:20 ;
    AJAX with PHP 45:15 ;
    Connect to DB 1:01:12 ;
    Outro 1:09:10 ;

  • @jamie10333
    @jamie10333 3 года назад +23

    This is one of the most straight forward tutorials I've watched for JavaScript. Most videos post either pure basics or pretty advanced tutorials. Been searching for a video like this.
    Thanks for this video.

  • @luciusrex
    @luciusrex 6 лет назад +20

    @14:45 for those wondering, the fx open is inherited from the XMLHttpRequest constructor and can be found under the prototype (__proto__) property.

  • @davza9629
    @davza9629 2 года назад +11

    This is in my opinion the BEST video explaining AJAX on RUclips. I have scoured for hours and no other videos have explained the concept in such an understandable way. Thank you so so much. This is going to be so much help in Web dev classes at school. You, sir are a life saver.

  • @vegasvato55
    @vegasvato55 6 лет назад +17

    I learned more with your videos in an hour than in all of the weekends of the past months.. I like the way you take the time to break things down and explain and diddle with the sections of code... The best i have ever seen... The way you play with things and break them is fantastic...

  • @wolv1289
    @wolv1289 7 лет назад +201

    Bye bye jQuery, going full vanilla now! :D

    • @maskman4821
      @maskman4821 6 лет назад +18

      yeah, quite agree with you, vanilla javascript is the fundamental, no need to use those fancy libraries, it gets confused....

    • @MaledictGaming
      @MaledictGaming 6 лет назад +4

      my words exactly :p

    • @justsomeguy8385
      @justsomeguy8385 5 лет назад +4

      importing JQuery for a fetch request makes your application heavier, and JQuery isn't that much simpler anyway. It's time to move on.

    • @BigPappaAaron
      @BigPappaAaron 5 лет назад +3

      yeah the native javascript api's are getting to the point where jQuery is no longer a "necessity".

    • @amrik9614
      @amrik9614 5 лет назад

      hellloo

  • @ahmedboutaraa8771
    @ahmedboutaraa8771 5 лет назад +2

    I don't believe that this courses are free and by the way Brad you're legacy but you need to lose some weight to be in your best health and to live longer so that we can pay you back for your contribution

  • @vaim5982
    @vaim5982 3 года назад +1

    it is really interesting that I can make a webpage, which is in some part adjustable but as I can copy some text from a local file, am I able to write them in the same text.txt file? I'm talking locally
    Great video btw.

  • @ajazmiah
    @ajazmiah 7 лет назад +15

    Can't explain how happy I was to see this pop up in my notification. Couldn't wait to come home and watch it as if it was a game I recorded while I was away! Lol. Great video 👍

  • @mofe620
    @mofe620 3 года назад +5

    Just finished this, right after watching the JSON Crash Course.
    Two hours ago, JSON and Ajax didn't just make sense to me (I had used them a number of times, without understanding anything 🤧).
    Right now, I totally understand everything.
    Thanks a lot Brad. You're amazing.

  • @bradcres1120
    @bradcres1120 5 лет назад +5

    Idk if it's just me but I think doing AJAX with vanilla JS is a lot simpler than doing it with jQuery. Thanks Brad!

  • @brahimbelkhiria2157
    @brahimbelkhiria2157 7 лет назад +10

    hey brad can you make tutos on handle payments plz like e-commerce project

  • @Dexter101x
    @Dexter101x 6 лет назад +6

    Oh gosh, I thought vanilla JS was some complicated JS framework, lol.....only 0 bytes in size

    • @michalbotor
      @michalbotor 5 лет назад +1

      i still can't get used to that. :) i find it silly. ;) but if it had been a library or a framework, than funnily enough, it wouldn't have sounded any more fancier, than the ones that are already out there. ^_^

  • @ladywebber1726
    @ladywebber1726 3 года назад +5

    You're such a great instructor. Thank you for teaching me a whole lot from your videos. :) very inspiring as well.

  • @coredatallc5671
    @coredatallc5671 3 года назад +1

    The first button1 works, but it skips every other for some reason. Button #2 does not work...no matter what I do, the '{' tags do not match, and the browser throws and error. It must be in the 'for loop' but I've tried a hundred ways to fix it, and no result. I see your output, and I have the same code...looked at it a thousand times...it simply doesn't work. Using Chrome and Brave, and Opera....same result. The information is great...I just don't know why button#2 doesn't render. I wish the files contained the code for what was on the screen, so I could figure out my errors...but alas...they are not. So sad of an ending to such a great tutorial.

  • @pedrosousa6576
    @pedrosousa6576 7 лет назад +9

    Woah how did you know I was looking for an Ajax tutorial?! I even watched your Json video yesterday and now you posted this. You're the man! Thanks brad

  • @scwong
    @scwong 5 лет назад +11

    "You may recognise these names here, if you're cool." hahahhahhaa

  • @mynameis3005
    @mynameis3005 7 лет назад +13

    thank you for taking the time off to create such good content. you have inspired me to help share my knowledge in the future.

  • @freiyarobloxbedwars208
    @freiyarobloxbedwars208 Год назад +1

    Tysm for this tutorial definitely help me alot to create interactive stuff without reloading the actual page :D!

  • @yitzchaksviridyuk932
    @yitzchaksviridyuk932 4 года назад +4

    Brad, thank you very much. I sincerely appreciate this content and the time and effort you've invested into it. I basically never watch ads, but here, I left them running. I'm working on a couple web development projects right now, and I'll probably buy one of your JS courses on Udemy. Thanks again. :)
    Don't mind this section... just me making a couple bookmarks:
    1:06:19 - using PHP file to fetch info from database and send it to html file as JSON
    1:07:40 - parsing and using received JSON in html file
    Interesting to me, since I just use PHP files, taking info directly, even with AJAX. Brad's way seems safer.

  • @simple_lide
    @simple_lide 4 года назад +5

    Thank you, Brad. Your tutorials are awesome. You actually do things from scratch, and explain every step. Also, I like those types of videos as - "been showed - now practice", short and valuable. Great! Wish you all the best from Ukraine! :)

  • @saadwasil
    @saadwasil 5 лет назад +6

    The most beneficial hour I've spent in the past few days. Thanks, Brad.

  • @DanielBurchfield
    @DanielBurchfield 3 года назад +3

    Great work through. I am an AJAX noob to be accurate, and this was a great way to get to know the tech. Much appreciated.

  • @clandestainofsales8644
    @clandestainofsales8644 3 года назад +1

    Hi how to send multiple variables in case of ajax with post method?

  • @missinglink2416
    @missinglink2416 3 года назад +1

    guys what type of data can be returned or requested by the xmlhttprequest object?

  • @nenadmihajlovic2102
    @nenadmihajlovic2102 7 лет назад +17

    Walking dead array :)

  • @pavankumargumparthy4546
    @pavankumargumparthy4546 4 года назад +1

    hii sir,
    when ever i make a request these errors pop up i dont understand what they are and how to overcome them please help me sir.

  • @easternhair
    @easternhair 6 лет назад

    thanks lot for your courses on here, got this questions, once we retrieve data from json how can we pass it to lets say assign it ot a variable and be able to use it later on next functions and objects, pelase, herer the script i got sctuck,
    var xrequest = new XMLHttpRequest();
    xrequest.open('GET', 'videos.json', true);
    xrequest.onreadystatechange = function(){
    if(this.readyState == 4 && this.status == 200) {
    var json = JSON.parse(this.responseText);
    for(var i=0; i

  • @RamonChiNangWong078
    @RamonChiNangWong078 2 года назад +1

    What a very long tutorial.
    which I've listen to, twice!

  • @claudiobras22
    @claudiobras22 4 года назад +1

    Before i watch the full video, i hit the like button and then i watch the video, because i always know there something good i'm gonna learn from your tutorial.

  • @oghenefokethompson7407
    @oghenefokethompson7407 4 года назад +1

    Best video Channel for learning programming thanks for helping my life

  • @LabhamJain
    @LabhamJain 4 года назад +1

    Should We Use Switch Case Instead Of Too Many If Elseif Statements ?

  • @giddeo
    @giddeo 3 года назад +4

    Really good, solid tutorial. I'm doing a course currently and this was just baffling to me at first but you've just made it so much more accessible and easy to understand. Excellent, thank you.

  • @magloirebanza4846
    @magloirebanza4846 4 года назад +33

    Who is here in october 2020??

    • @kodingmania1787
      @kodingmania1787 3 года назад

      iam here in november

    • @MrChiran59
      @MrChiran59 3 года назад +1

      DId the lorem50 (dummy text) work for you ? It works on my html file, but not in my txt file. i looked it up and there is something called emmet

    • @alinaspahiu8790
      @alinaspahiu8790 3 года назад +3

      here in January, 2021 :P :P

    • @rahuldora1587
      @rahuldora1587 3 года назад +1

      @@alinaspahiu8790 same

    • @adamrahman2884
      @adamrahman2884 Год назад

      Me

  • @delicious_cracker
    @delicious_cracker 3 года назад +2

    Passed 4 Years, I still watching this. Love Brad.

  • @sanjaysanthosh1149
    @sanjaysanthosh1149 Месяц назад +1

    Outstanding course ever 2025❤

  • @johnfarmingdale
    @johnfarmingdale 7 лет назад +1

    This doesn't work on older browser and I never had a problem with it at all.
    SIMPLEST AJAX:
    function ajaxcall(a,b,c){ c=new XMLHttpRequest; c.open('POST',a);c.onload=b;c.send();} // AJAX CALL
    function ajaxfunc(){ confirm(this.response); } // AJAX FUNCTION AFTER PROCESS
    // ajaxcall('ajax.php',ajaxfunc); // THE FUNCTION CALL "C" is not needed.

  • @nereusanthony9474
    @nereusanthony9474 2 года назад +1

    Really helpful keep up the good work
    One love ❤️

  • @vedangkavathiya8652
    @vedangkavathiya8652 3 года назад +1

    Thank you very much, it's very useful

  • @rubel1477
    @rubel1477 3 года назад +8

    36:49 work with external API
    45:09 work with PHP
    55:10 work with the post Request

  • @pendyalaabhishek8866
    @pendyalaabhishek8866 3 года назад +1

    big thanks for making education free.

  • @mohamadfarid4097
    @mohamadfarid4097 6 месяцев назад +1

    after 6 years still you are the best

  • @speakenglishwithjoe2023
    @speakenglishwithjoe2023 3 года назад +1

    You have really made my day with this crash course. OMG very easy to understand. Thanks so much for this video.

  • @jacksurtees8577
    @jacksurtees8577 5 лет назад +1

    4.1k likes to freakin 35 dislikes... i think that says it all Brad.
    And wtf is wrong with those 35 people?

  • @shatterking215
    @shatterking215 6 лет назад +3

    This really helped me learn the ins and outs of AJAX! It was also a nice refresher for php & MySQL. Thanks Brad!

  • @computerscience1152
    @computerscience1152 3 года назад +1

    700 th comment
    Awesome Ajax crash course

  • @carsdailyhk
    @carsdailyhk 3 года назад

    Can I ask the community: in the last part of the video talking about calling PHP to interact with mySQL, why need to take this detour but not interacting with mySQL directly? Is it because JS is not capable to query mySQL? Great thanks to this video, I start my js from zero with Traversy. Excuse me if I asked a stupid question.

  • @tedshapera8062
    @tedshapera8062 6 лет назад

    Great video Brad. One thing at the end - I got an error message:
    Uncaught SyntaxError: Unexpected token / in JSON at position 0
    at JSON.parse ()... Can't see why, but something to do with the line:
    var users = JSON.parse(this.responseText); ?? (Maybe my settings in Xampp...)
    But thanks again for the great video, you always explain the WHY part of it!
    Ted from Winnipeg, Canada

    • @rnk092
      @rnk092 5 лет назад

      Hey, did you solve this error? I had the same problem here too =/

  • @donaldabel6228
    @donaldabel6228 4 года назад +1

    This was very helpfull for the understanding of AJAX. Thanks. I haven't started PHP yet but I understood the principle

  • @apuroopnaidu5874
    @apuroopnaidu5874 6 лет назад +2

    At 25:48, isn't line 36 supposed to be *} elseif(this.status == 400) {*

    • @yangyangcui9150
      @yangyangcui9150 6 лет назад +1

      At 25:48, isn't line 36 supposed to be } elseif(this.status == 404) {

  • @Grillinsky
    @Grillinsky 3 года назад

    On 58:00, during the "setRequestHeader" xhr parameter call, Brad says "applicationSLASHxDASHwwwDOTformDOTurlencoded" BUT HE MEANS TO SAY "applicationSLASHxDASHwwwDASHformDASHurlencoded"

  • @developer_hadi
    @developer_hadi 2 года назад

    Hi bro please help, I'm struggling to understand promises vs async , and fetch vs xhr

  • @tigere01
    @tigere01 5 лет назад +1

    In just an hour, I now quite get the XHR object and the kind of situations where it is useful i.e. display data from a url without having to do a full page reload. Thanks a tonne Brad.

  • @funnyanimalworld7579
    @funnyanimalworld7579 3 года назад

    everything except for php part was ok but there since i have 0 knowledge on php i had to use different guides on how to set up everything .and everything worked differently probably because i haven't done some steps.But i came here searching for front end part so i didn't wanted to go to deep in php

  • @cesarlara3974
    @cesarlara3974 7 лет назад +5

    Can you do a video responsive website with CSS grid?

    • @Venzera
      @Venzera 7 лет назад +1

      HackerEarth has a good 3 part tutorial on CSS Grid

    • @n_fan329
      @n_fan329 6 лет назад

      ruclips.net/video/moBhzSC455o/видео.html

  • @iancarr3923
    @iancarr3923 6 лет назад +2

    These videos are invaluable. They serve as a great guide to html, css, ajax, etc particularly when reviewing videos from other providers

  • @markanthony9432
    @markanthony9432 4 года назад

    35:25 ajax2.html "Uncaught TypeError: cannot read prperty 'id' of null at XMLHttpRequest.xhr.onload (ajax2.html57)
    I remove the [i] and I get several loops of array key pairs with undefined as values. Any help would be nice.
    EDIT: Never mind...I changed loop from users to user and change key val pairs to singular ...user[i].id...and it works perfectly.
    Thanks

  • @kaushikdr
    @kaushikdr 3 года назад

    Why do we need to use onload and then send? Why can't we just do
    xhr.get("GET", "file.txt", true); and then
    console.log(this.responseText);?
    Also, why do you do "this.responseText" instead of "xhr.ReponseText"?
    I am a beginner with JS, and I am learning a lot through your video, thanks!

  • @MarkErolManansala
    @MarkErolManansala 10 месяцев назад

    Hello Mr.Brad Traversy, i finished the video and just wanna say THANK YOU!!!

  • @rabiumuhammedeffect423
    @rabiumuhammedeffect423 Год назад

    but, anyways, thanks for everything, i really appreciate all the lessons.
    i can now code in all web languages, including python and c++.
    your tutorials really helped as a startup.
    THANKS SOOOO MUCH

  • @nekoroden
    @nekoroden 5 лет назад

    Hi, around 18:09, instead of status 200 I got an '304 not modified', also on the console I got an error like this:
    " Access to XMLHttpRequest at 'file:///C:/xampp/htdocs/ajaxcrash/sample.txt' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
    loadText @ ajax1.html:31 "
    Can someone help me plz, how to fix it?

  • @artihlec
    @artihlec 5 лет назад

    14:47 any idea why open method isn't showing up under console.log(xhr) ?
    Sure you can check its presence via 'open' in xhr and also it will be showing in XMLHttpRequest.prototype.
    I thought for a second that maybe because it's not enumerable (enumerable: false) but actually it's not the case since Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'open').enumerable === true

  • @mosesfahmipratama5378
    @mosesfahmipratama5378 3 года назад

    Wow thank you...
    I now.. really really understand to ajax with vanila javascript.. in 2021 year, i watching to your RUclips channel ❤️

  • @jordangunn2851
    @jordangunn2851 3 года назад

    Does anybody know how to access ajax1.html from localhost/ajaxcrash/ajax1.html? I installed xampp but can't seem to get any further than that! Thank you!
    Edit: If anyone else it stuck on this, had to move the 'ajaxcrash' folder inside C:\xampp\htdocs\

  • @brandonikjoo
    @brandonikjoo 7 лет назад +2

    Thank you so much about the video. It's the best AJAX tutorial video I've ever have!

  • @sent4dc
    @sent4dc 4 года назад

    42:45 congrats, you created a good example of the XSS (Cross-Site-Scripting) vulnerability.
    PS. I was hoping for an SQL-Injection too, but you caught that one. So at least kudos there.
    Anyone watching -- DO NOT simply write text into your client website as innerHTML -- you need to encode html entities in it first!

  • @opiliteelixx2772
    @opiliteelixx2772 2 года назад

    I don't know why, but I can't run the first code (ajax1). It says 'Cannot read properties of null (reading 'addEventListener')'.I've tried also with the jQuery function .ready(), but it wasn't working.

  • @FahadKhan-rp3rz
    @FahadKhan-rp3rz 4 года назад

    Currently, I'm at an intermediate level in HTML CSS, and JS and noob about back-End that how PHP & MySQL works and relative b/w them. So, today I feel relaxed due to knowing the full-stack web app work somehow. Thanks for the video.

  • @ИванКачаунов
    @ИванКачаунов 2 года назад +1

    Extremely useful!! That's what i've been searching for. Thank you for the time spent on this lesson!

  • @andresalvarez7303
    @andresalvarez7303 2 года назад +1

    THANK YOU! It's so hard to find a good web dev tutorial nowadays that doesn't rely heavily on libraries (jQuery) or skips over many core concepts of how and WHY things work the way they do on the web.

  • @johnlyons7678
    @johnlyons7678 Год назад

    Great video Brad! I know this is almost 5 years late, but has anyone gotten this error at the very end on ajax 5? Unexpected token '

  • @thiagowfer
    @thiagowfer 5 лет назад

    I had an error, CORS issue:
    "from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https."

  • @SA-oj3bo
    @SA-oj3bo 6 лет назад

    Hi Brad, I not understand why xhr.open('GET', 'api.github.com/users', true); gives no problems in your example, because I get the error "No Access-Control-Allow-Origin header is presented on the requested resource" when I try to access another API server. I googled it and found things like "Same origin policy" is needed and no cross URL allowed. Please advice, thx.

  • @siyathkasali
    @siyathkasali 7 лет назад

    Failed to load url: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'url.com' is therefore not allowed access.
    please do a video on Access-Control-Allow-Origin so that it will be very useful for all
    Thanks in advance :)

  • @bhanuprakash7023
    @bhanuprakash7023 4 года назад

    Can you do for using ajax libraries(jquery, axios etc..) for another videos, and we missed the topics in that please
    " Explain, How to use Post, Put , Delete method."
    Really helpful video for beginners with Ajax crash course

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 7 лет назад +1

    Hi Brad u r awesome. Can you make video on quize app with JavaScript and back end

  • @christofstanits
    @christofstanits 4 года назад

    excellent video! as always.
    theres a small bug in there @25:51:
    it should be: ..else if(this.status == 404) {...
    double equals sign!
    the code seems to work, but its not actually checking for 404. it just always returns true.
    I checked your code archive and the bug is still in there.
    thank you brad for all your great work! love your channel!

  • @gabrielhauschildt9041
    @gabrielhauschildt9041 4 года назад

    Help please: I got everything working using Xampp and Brackets up until working with the .php file. I looked online and found some advice to try setting the Brackets Live Preview Base URL to localhost/AJAX crash but this didn't work. I tried several other ways to write the live preview base url. If anyone knows how to get Brackets working so I can complete the last two exercises in this tutorial, I would greatly appreciate your help.
    I plan to learn Node instead of php as I was advised that Php is "dead" but I just want to use these exercises to familiarize myself with AJAX.

  • @TheBretlinne
    @TheBretlinne 4 года назад

    I noticed that we've skipped the try-catch business in creating the XHR object. theNewBoston's tutorial on AJAX and others go through a series of try-catch statements to ensure the XHR object is created the right way based on browser. Was this step not done because its a deprecated technique? theNewBoston's tutorials are a little old (2013) and so I thought 'maybe now enough browsers uniformly support AJAX and the XMLHttpRequest object that the try-catch implementation is obsolete'. Is that the case?

  • @dasilvajohnful
    @dasilvajohnful 3 года назад

    Very good course, i still have an issue with the AJAX Form with POST method, looking at the console is "Proccessing..." for unlimited time without reaching the POST response.

  • @peterpark9143
    @peterpark9143 4 года назад

    Great video! Learned a lot!! First time to run Apache server and connect to MySQL, even able to use phpmyadmin!!! only took 30 times repeat and retry!!! Oh of course AJAX too!! Thanks

  • @SingTingz31
    @SingTingz31 4 года назад

    I'm stuck at the console.log(this.responseText) part at 17:37, but it isn't loading the text from the sample.txt file. I'm using Live Server on VS Code and I see in Network when I click the button, it shows up as Status 304.

  • @DanteHellDrive
    @DanteHellDrive 4 года назад

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    Please help iam having this error for ajax5.html

  • @jeminiloco2080
    @jeminiloco2080 3 года назад

    instructions unclear learned Asynchronous JavaScript and XML
    also know as AJAX

  • @bhaveshmahale1179
    @bhaveshmahale1179 2 года назад

    Hi bro. Can I use thymeleaf annotations th:text, th:block, th:value, etc in the innerHTML you are appending in this code?

  • @pastasawce
    @pastasawce 4 года назад

    Hey, does anyone else have problems with CORS policy blocking this from working? How can I fix it, and why doesn't it happen in this tutorial?