Building a Messaging App | Javascript | Tutorial 15

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • Source Code - www.giraffeacad... This video is one in a series of videos where we'll be looking at programming in JavaScript. The course is designed for new programmers, and will introduce common programming topics using the JavaScript language.
    Throughout the course we'll be looking at various topics including variables, arrays, getting user input, loops, conditionals, interacting with the DOM and much more.

ความคิดเห็น • 199

  • @sammy3858
    @sammy3858 4 ปีที่แล้ว +96

    Now this is someone who knows how to teach.

    • @harpermartin7813
      @harpermartin7813 3 ปีที่แล้ว +1

      Right! Have a great day! Jesus Christ loves you!

    • @aanyashresth7852
      @aanyashresth7852 2 ปีที่แล้ว +1

      I means you have not seen Dev Ed tilll now

    • @ytbook9639
      @ytbook9639 2 ปีที่แล้ว

      Wow I know him too

  • @terencefranzindenerio9386
    @terencefranzindenerio9386 4 ปีที่แล้ว +40

    Love the way you enlarge the text... It helps us who only use 144p and 240p... because the net in our country is so slow...

  • @DiamantOpp
    @DiamantOpp 11 หลายเดือนก่อน +1

    There's an XSS vulnerability in your code, use innerText instead of innerHTML, because if you use innerHTML, then someone could just put "helloalert('xss attack');" and the script would run.

  • @simbaevans.3301
    @simbaevans.3301 2 หลายเดือนก่อน +1

    Just finished learning Tutorial 15.Thanks to Mike

  • @kpos_fresh9379
    @kpos_fresh9379 4 ปีที่แล้ว +7

    I understood you better than my college lecturers...it be awesome if you could do more basic lessons 🤘🔥

  • @djfago6240
    @djfago6240 ปีที่แล้ว

    bro you are a genius. i have been watching your videos trying to teach my self javascript and i must acknowledge your efforts in teaching some of us for free. I wish you could teach me javascript personally. Thank you for every sharing your knowledge with us for free. with love from Belgium

  • @Ginfio
    @Ginfio 5 ปีที่แล้ว +28

    I love how you explain things and stuff. I just really like it.

    • @qubecrafts4657
      @qubecrafts4657 2 ปีที่แล้ว

      wow i thought you were a nitro type player right lol did not know you could code

  • @peppermintdior
    @peppermintdior 3 ปีที่แล้ว +2

    Mike is one of the best teachers on this earth. Much love from India

  • @Fred-B
    @Fred-B 4 ปีที่แล้ว +1

    if this man is not making truck loads of money; there is a problem or two with our world. I am an older guy learning from a millenial (i guess) ...This guy is the best programming teacher I have come across so far and I am a teacher too (not programming though).

    • @ytbook9639
      @ytbook9639 2 ปีที่แล้ว

      What do you teach

  • @DaOJ
    @DaOJ 2 ปีที่แล้ว +1

    im using visual studio code and for some reason the js code and HTML code isnt working together

  • @MsCellobass
    @MsCellobass 3 ปีที่แล้ว

    Great!! Someone who ACTUALLY SHOWS JAVASCRIPT IN ACTION On A PAGE!! Thnx dude! You are awesome!

  • @lizalizaveta1882
    @lizalizaveta1882 3 ปีที่แล้ว +2

    it's a very old video, but very useful for beginner students like me, thank you!

  • @bashircodes
    @bashircodes 4 ปีที่แล้ว +5

    Thank you your way of teaching is cool and understandable.

  • @kamsyd13
    @kamsyd13 3 ปีที่แล้ว +2

    Dude how do u remember all the codes..?
    Is there any way to get codes ..
    Please do reply

  • @terraflops
    @terraflops 5 ปีที่แล้ว +5

    i typed exactly what you did and it does not post text entered. Fails to work. // Thanks for the video though

    • @senor_nathak
      @senor_nathak 4 ปีที่แล้ว +2

      Same here

    • @naza3519
      @naza3519 4 ปีที่แล้ว

      @@senor_nathak Where?, Are u sure you are linking correctly the js ?

    • @senor_nathak
      @senor_nathak 4 ปีที่แล้ว

      @@naza3519 yes

    • @bhanubani4221
      @bhanubani4221 3 ปีที่แล้ว

      Same 😥

    • @desmondfoo5050
      @desmondfoo5050 3 ปีที่แล้ว

      add js file after html code in body

  • @abdurrafaywali4756
    @abdurrafaywali4756 ปีที่แล้ว

    Now the real stuff is kicking in!!!!

  • @tavvalakshminarayanareddy8143
    @tavvalakshminarayanareddy8143 3 ปีที่แล้ว +1

    you are great but can you please even keep how to make a app like youtube using only js and html

  • @MCJamess
    @MCJamess 2 ปีที่แล้ว

    i love how people watching this in 2021 too.. Love it

  • @AP_3XV1
    @AP_3XV1 3 ปีที่แล้ว

    Another great video Mike, thank you. I love the way that you use an as a sort of replacement for a database. This is where you stand out from other tutorials I watch. Often the tutor will divert down a path about databases at that point and next thing i know I feel hopeless that theres another area that I am so far off from understanding. The focus on JS and ability to keep it on track here is so refreshing.

  • @justinxten4real657
    @justinxten4real657 3 ปีที่แล้ว +2

    Nice Video
    I wouldn't exactly Call this beginner friendly, but nice stuff

  • @otmanmorningstar4702
    @otmanmorningstar4702 3 ปีที่แล้ว

    U know what i like abt u man is that u make things simpl i wish that u keep it like this forever keeep it up king

  • @Remix-e4u
    @Remix-e4u ปีที่แล้ว

    I couldn't understand the element calling here, using append and everything that happened inside the function.

  • @lavenderodhiambo667
    @lavenderodhiambo667 7 หลายเดือนก่อน

    I tried and it worked...amazing😊

  • @gloryjin6438
    @gloryjin6438 3 ปีที่แล้ว +1

    uncaught type Error:can not read this property 'addEventListener' of null
    line6

    • @dabrad7828
      @dabrad7828 3 ปีที่แล้ว

      Getting this exact same issue, have you figured it out yet?

    • @astackzzzz277
      @astackzzzz277 3 ปีที่แล้ว

      You might not be properly referencing the button right when you do document.getElementById('button').
      Breaking it down, Line 6 (if your code is the exact same as the tutorial) says something like this:
      button.addEventListener('click', function(){//code})
      The error says that it can't read the PROPERTY addEventListener of NULL.
      With that we can make the assumption that your code is being read like this:
      null.addEventListener('click', function(){//code})
      ***Notice that is it null before the addEventListener instead of button
      The only way that can happen is if button = document.getElementById('button') is returning null i.e. button = null
      Thus, the issue could be:
      (1) The HTML is not quite right, make sure that the button has an id of button i.e.
      Send
      (2) The is not in the correct spot in the HTML file. Make sure the is the the LAST tag in the body tag. Or if it comes before the button tag make sure it has the defer attribute(so the file loads after the button loads) i.e.
      (3) If (1) and (2) are good, then the reference to the button in the JS is not quite right, so make sure the reference is like this:
      const button = document.getElementById('button')
      This might be too late but maybe it might help someone down the line.

  • @codewithabdullah3496
    @codewithabdullah3496 2 ปีที่แล้ว

    Mike I need your help because I have completed with this vidio and I understand it very well but I was trying to run this code is not display a massages i don't what is my error pls can u help me

  • @opeyemijayeola8408
    @opeyemijayeola8408 ปีที่แล้ว

    I tried it the way you did it but didn't get the same output as yours

  • @mrgasmask7584
    @mrgasmask7584 3 ปีที่แล้ว +2

    which kind of server ar the html running on. And can i use the vscode server?

    • @dhwajsharma
      @dhwajsharma 3 ปีที่แล้ว

      open live server extension

  • @asianman103
    @asianman103 3 ปีที่แล้ว

    i have a problem it keep saying button not defined

  • @mrgasmask7584
    @mrgasmask7584 3 ปีที่แล้ว +1

    hey im new to webdev can sombody tell me what program is used in this toturial mayby it is just me that is dam but i vant figure it out

  • @monkey00019
    @monkey00019 ปีที่แล้ว

    how would I create a real app that sends through a WebSocket

  • @agustinl7499
    @agustinl7499 4 ปีที่แล้ว +5

    wow so much hate, I really liked this tutorial, thanks mike!

  • @prochorusrhythmstv3871
    @prochorusrhythmstv3871 ปีที่แล้ว

    How can I build a broadcast app with java script plus help me

  • @alaaasassii4433
    @alaaasassii4433 3 ปีที่แล้ว

    yoooo this man is the best I hope he can upload new vids like days every time

  • @treasurerajshanmugam6733
    @treasurerajshanmugam6733 4 ปีที่แล้ว +1

    It's was super easy to understand...Thank you

  • @zackprogamer5305
    @zackprogamer5305 3 ปีที่แล้ว +1

    and you can use: bgcolor="purple" this is for the background color

  • @neharikapuri3889
    @neharikapuri3889 5 ปีที่แล้ว +2

    Hi, I tried it but my text is coming up on the same line. Where should I insert the ,

    • @anselminos5238
      @anselminos5238 5 ปีที่แล้ว +3

      its just

    • @lovaalette9596
      @lovaalette9596 5 ปีที่แล้ว +3

      Neharika technically doesn't need to be closed off. As for where to insert it usually depends on where your problem lies. And generally you'd have an idea as to where you'd need a break.

    • @wingmanup7368
      @wingmanup7368 3 ปีที่แล้ว

      doesnt need an ending tag btw

  • @sampath2927
    @sampath2927 3 ปีที่แล้ว

    i dont understand why he used appendchild????

  • @AnimeThings_
    @AnimeThings_ 4 ปีที่แล้ว

    I love you bro I have learned so many tutorials with you.....

  • @kgaming7599
    @kgaming7599 5 ปีที่แล้ว +3

    Why don’t you just add the attribute onclick to the button through the HTML code?

    • @nostalgia5031
      @nostalgia5031 4 ปีที่แล้ว

      It’s simpler.

    • @nostalgia5031
      @nostalgia5031 3 ปีที่แล้ว

      Woah, it, it's me from a year ago. Wait, I WATCHED THIS :O

    • @kgaming7599
      @kgaming7599 3 ปีที่แล้ว

      @@nostalgia5031 Hello, you from a year ago! XD

    • @import-success
      @import-success 3 ปีที่แล้ว

      @@nostalgia5031 😂😂

  • @mikefrancesco8281
    @mikefrancesco8281 5 ปีที่แล้ว +1

    hei mike can u teach me how to learn java script native??
    i dont know how to start it

  • @senor_nathak
    @senor_nathak 4 ปีที่แล้ว +1

    Not working

  • @skateboarderlucc
    @skateboarderlucc 4 ปีที่แล้ว +1

    This is really useful, however I think the title is a bit misleading. Maybe use this video as a starting point for a series?

    • @sau-students-union9552
      @sau-students-union9552 4 ปีที่แล้ว

      how is it misleading?? you should convey the truth bro you are a saint.

    • @skateboarderlucc
      @skateboarderlucc 4 ปีที่แล้ว +1

      ​@@sau-students-union9552 Why the hostility? "building a messaging app" implies that the app could be deployed and used by two parties to communicate. This video only covers the basic front-end mechanics which is why I said its useful but would be better suited as a starting point in a series that covers the back-end as well. Cheers.

    • @jguillermooliver
      @jguillermooliver 3 ปีที่แล้ว

      @@skateboarderlucc It's a beginner javascript course. It's not missleading.

  • @mayankchauhan6680
    @mayankchauhan6680 5 ปีที่แล้ว +9

    So basically you have built a messaging app that shows your messages to yourself. It might be a good tutorial for javascript point of view but the title is a bit misleading. You need to have a server-based communication system as well.

    • @tipolacko
      @tipolacko 5 ปีที่แล้ว +1

      Mayank Chauhan totally agree, has nothing to do with an messaging app ...

    • @subgero
      @subgero 5 ปีที่แล้ว

      Agree, this is a tutorial for alter the DOM.

  • @anupamacharya7225
    @anupamacharya7225 2 ปีที่แล้ว

    Really love u bro .......amazing teaching

  • @velhoguidsd
    @velhoguidsd 3 ปีที่แล้ว

    A very easy todoList

  • @MohamedYuss
    @MohamedYuss 3 ปีที่แล้ว +1

    This guy is just great 👍🏻 and I really mean it.

  • @hyperloop4519
    @hyperloop4519 3 ปีที่แล้ว

    Will this message appear to everyone in the website

  • @rajashekhar433
    @rajashekhar433 5 ปีที่แล้ว +3

    What about queryselector?

  • @up-beat-music
    @up-beat-music 3 ปีที่แล้ว +1

    Thank you sir for making this video😀😀🙏

  • @prajinshankarkarthik8013
    @prajinshankarkarthik8013 3 ปีที่แล้ว

    How to add data in a textbox without replacing the current data.

  • @andyjagroom.3878
    @andyjagroom.3878 3 ปีที่แล้ว

    Hey can any one tell me how to make the dot disappeared

  • @bizzbizz5582
    @bizzbizz5582 3 ปีที่แล้ว

    How will we create app I entered the javasc Ripton but nothing happened

  • @obertmakaza
    @obertmakaza 4 ปีที่แล้ว

    Hey buddy I am a beginner. How do I start to create an App since I am interested in software engineering

  • @infohub3709
    @infohub3709 2 ปีที่แล้ว

    Great one Mike. But I observed something here. Even when the textbox contains nothing, when the SEND button is clicked, an empty message is sent. Who can help me rewrite the code?

    • @bernardkoech4463
      @bernardkoech4463 ปีที่แล้ว

      Mike's Page
      Send
      JS Code:
      const messages = document.getElementById("messages");
      const textbox = document.getElementById("textbox");
      const button = document.getElementById("button");
      const msg = document.getElementById("errormsg");
      button.addEventListener("click",function(){
      if(textbox.value ==='')
      {
      msg.innerHTML = 'Please enter text on the text box';
      msg.style.backgroundColor = "red";
      setTimeout(()=>msg.remove(),3000);
      textbox.focus();
      } else{
      let newMessage = document.createElement("li");
      newMessage.innerHTML = textbox.value;
      messages.appendChild(newMessage);
      textbox.value = "";
      textbox.focus();
      }
      });

  • @hitechzcoder1887
    @hitechzcoder1887 3 ปีที่แล้ว

    i have a error when i press send it is not getting send

  • @ausglobeman
    @ausglobeman 5 ปีที่แล้ว +2

    'genrally' You would use document.querySelector to define a variable with an element, this is far easier to understand during a debugging process and the DOM is more reliable. How long have you been practising js css and html?? doesnt seem like for long

    • @skateboarderlucc
      @skateboarderlucc 4 ปีที่แล้ว

      why not both? getelement is better supported, and for this guys use is perfectly fine as hes only selecting by id. If he needed to refine the selection queryselector would better.

  • @smltv01
    @smltv01 3 ปีที่แล้ว

    the best one ever , with all my respects

  • @codefoxx
    @codefoxx 2 ปีที่แล้ว

    Bro this is no messaging app, cut it out. Its more like a to-do list app.

  • @parkzex5727
    @parkzex5727 3 ปีที่แล้ว

    Bro he is really really smart

  • @raviteja5093
    @raviteja5093 3 ปีที่แล้ว

    What about the client side??

  • @innatsyban7082
    @innatsyban7082 5 ปีที่แล้ว +1

    Well done chap!

  • @arnavdatti
    @arnavdatti 3 ปีที่แล้ว

    which app or web we can us to make java

  • @robertoriosmorales7528
    @robertoriosmorales7528 2 ปีที่แล้ว

    good job dude, very helpful

    • @narsimhas1360
      @narsimhas1360 2 ปีที่แล้ว

      Did this work for you. It is not working for me

  • @scottisitt
    @scottisitt 4 ปีที่แล้ว +1

    The textbox and button show up on my page, but no messages show up after clicking send. EDIT: Problem solved. I had misspelled "messenger" when referencing the JS source in HTML and (as Arkeel and Xeo pointed out below), I had made input a container tag when it shouldn't have been.

    • @xeomiku4940
      @xeomiku4940 4 ปีที่แล้ว +1

      Can i see your code?

    • @xeomiku4940
      @xeomiku4940 4 ปีที่แล้ว +1

      I kinda have the same problem and then I realized I wrote ".appendchild" instead of ".appendChild" lol

    • @scottisitt
      @scottisitt 4 ปีที่แล้ว

      @@xeomiku4940 This is my JS code...
      var messages = document.getElementById("messages");
      var textbox = document.getElementById("textbox");
      var button = document.getElementById("button");
      button.addEventListener("click", function(){
      var newMessage = document.createElement("li");
      newMessage.innerHTML = textbox.value;
      messages.appendChild(newMessage);
      textbox.value = "";
      });
      And this is my HTML code...

      JS Messenger App

      JS Messenger App

      Send

      I had tried taking the h1 header out of the HTML file to see if that made a difference, but it didn't.

    • @scottisitt
      @scottisitt 4 ปีที่แล้ว

      @@xeomiku4940 Ha Ha :) Yeah, I'm pretty careful about the case sensitive stuff. But I have made typos before or I have text on the wrong side of brackets.

    • @arkeelnilar4294
      @arkeelnilar4294 4 ปีที่แล้ว +1

      @@scottisitt input is not a container tag.
      The correct format is
      .

  • @leonmaar1927
    @leonmaar1927 4 ปีที่แล้ว

    Are These Messages
    shown for everybody on the Page?

  • @nour3660
    @nour3660 ปีที่แล้ว

    this is great but what i now want to know is how to actually make a functioning messaging website

  • @masumali8356
    @masumali8356 3 ปีที่แล้ว

    great work done by you...

  • @555asg
    @555asg 3 ปีที่แล้ว

    What app is that

  • @sasinduadithya6245
    @sasinduadithya6245 6 หลายเดือนก่อน

    Hello Currently this chanel working ?

  • @sonamuhialdeen7866
    @sonamuhialdeen7866 3 ปีที่แล้ว

    Awesome tutorial

  • @silentxcure
    @silentxcure 3 ปีที่แล้ว +1

    you're incredible.

  • @mohammadsaleh461
    @mohammadsaleh461 ปีที่แล้ว

    is it just me or the code really doesn't work!

  • @pluuid7133
    @pluuid7133 4 ปีที่แล้ว

    What is the computer app called

  • @kanishksalian374
    @kanishksalian374 3 ปีที่แล้ว

    It is not working☹

  • @CutieJunieFreak
    @CutieJunieFreak 5 ปีที่แล้ว +1

    working great!

  • @mansourlotfim
    @mansourlotfim 5 ปีที่แล้ว

    i do it line by line but get this error:
    Uncaught TypeError: Cannot read property 'addEventListener' of null

    • @jovanjevtic5311
      @jovanjevtic5311 5 ปีที่แล้ว

      your button does not exist in HTML

    • @jdujdjruxjJeujdj
      @jdujdjruxjJeujdj 4 ปีที่แล้ว +1

      Always add the js file after body mean at last

  • @owenmedia7206
    @owenmedia7206 4 ปีที่แล้ว

    Amazing well explain 👍👍👍

  • @gotem370
    @gotem370 2 ปีที่แล้ว

    the zoom is a little much

  • @pandasafkplayz7348
    @pandasafkplayz7348 2 ปีที่แล้ว

    If you want a easier way just use python and html although there not freinds they still work

    • @DominicNweze
      @DominicNweze ปีที่แล้ว

      They are cousins. Then 😂

  • @valencehockey1668
    @valencehockey1668 3 ปีที่แล้ว

    HOW DO I DOWNLOAD THE CODE?!!!!!!!!!!

    • @nostalgia5031
      @nostalgia5031 3 ปีที่แล้ว

      I'm pretty sure you just go through the source code link in the description.

    • @valencehockey1668
      @valencehockey1668 3 ปีที่แล้ว

      @@nostalgia5031 it leads to a website with no download code thing

  • @codebyaaryan6461
    @codebyaaryan6461 3 ปีที่แล้ว

    please make bootstrap tutorials

  • @amey7064
    @amey7064 5 ปีที่แล้ว

    Would be happy to see a back end part too.

    • @kgaming7599
      @kgaming7599 5 ปีที่แล้ว

      It doesn’t save when you refresh dude!!!

    • @jdujdjruxjJeujdj
      @jdujdjruxjJeujdj 4 ปีที่แล้ว

      @@kgaming7599 save it in localstorage

  • @raselbisswasrb
    @raselbisswasrb 5 ปีที่แล้ว

    Thanks bro. you are the best

  • @ramonetmedina4734
    @ramonetmedina4734 5 ปีที่แล้ว

    what app are you using

    • @AkarshG
      @AkarshG 5 ปีที่แล้ว

      its an software .... use visual code editor

  • @manoulita4363
    @manoulita4363 5 ปีที่แล้ว +1

    Thank u so much ^^

  • @nnamdiray9279
    @nnamdiray9279 ปีที่แล้ว

    this guy isperfect

  • @odinmaster6677
    @odinmaster6677 3 ปีที่แล้ว

    thanks alot

  • @dhwajsharma
    @dhwajsharma 3 ปีที่แล้ว

    Don't zoom in too much!

  • @snssatyabhagavan
    @snssatyabhagavan 4 ปีที่แล้ว +1

    Thank you you are my one of the teacher.

  • @avantikanagrale2084
    @avantikanagrale2084 3 ปีที่แล้ว

    Perfect 👍

  • @SOURAVKUMAR-di4xg
    @SOURAVKUMAR-di4xg 4 ปีที่แล้ว

    great sir

  • @smmosfequrrahaman3768
    @smmosfequrrahaman3768 6 ปีที่แล้ว

    nice tutorial

  • @leandrotrentzportoalegre9742
    @leandrotrentzportoalegre9742 4 ปีที่แล้ว

    Hi Alright Mike. How do I make sure that I persist the information on the screen and be seen by everyone at that moment in the url?

    • @arneolemans9117
      @arneolemans9117 4 ปีที่แล้ว

      Thats socket.io stuff (th-cam.com/video/rxzOqP9YwmM/w-d-xo.html)

  • @samuFring
    @samuFring 3 ปีที่แล้ว

    good man

  • @ayush5760
    @ayush5760 5 ปีที่แล้ว

    Sir which software

    • @AkarshG
      @AkarshG 5 ปีที่แล้ว

      visual code editor

    • @CosmicAerospace
      @CosmicAerospace 4 ปีที่แล้ว

      Its called Atom, it's a great software he recommends for web development languages like PHP , HTML,javascript and so on:)

  • @trannghiavo2773
    @trannghiavo2773 4 ปีที่แล้ว

    thanks you !

  • @RealCreativeShaurya
    @RealCreativeShaurya 3 ปีที่แล้ว +1

    8:06

  • @chariyassine5202
    @chariyassine5202 5 ปีที่แล้ว

    thanks buddy

  • @cromuelbarut9859
    @cromuelbarut9859 6 ปีที่แล้ว

    thanks

  • @calebwelsch1019
    @calebwelsch1019 3 ปีที่แล้ว

    my computer decided to shiz the bed right as coding and i ha dent saved