JavaScript course query, help please

Query, I’m doing the JavaScript programming course, I’ve came to the part very early on where you TEST your html from atom , I’ve followed the instructions until it says “open with” I don’t have Firefox and the browser I’m using doesn’t function correctly with the HTML code
So basically I can’t see the outcome of what my code looks like the way @ivan demonstrated

Any ideas? On a solution?
I’m going to continue on and I’ll check back for a reply
Thanks guys,
Happy learning!!

2 Likes

Have you downloaded Chrome? If you have screenshots for us to see what happens we would have a better idea as the problem

1 Like

Hi @stuart1066, hope you are great.

I could suggest you to have multiple browsers, because some times one of them could show issues that others dont.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Thanks guys
No problem sorted it ( that problem - onto next)
I did , I choose chrome for a alternative
The next issue is my code Is showing on the webpage , I must of inputted it incorrectly I’m going to follow the instructions again to check I didn’t miss anything out but I’m sure I followed correctly

@crypto85

I managed to solve the situation so Thankyou for that anyway
Enjoy your day
HAPPY LEARNING
Stuart

1 Like

2 Likes

Hi @stuart1066, hope you are great.

Now the problem you are facing is probably because you are saving the format of the file as “HTML”, which should be only “.html” (lowercase).

But apparently you sort it out, congrats! :partying_face:.

Carlos Z

1 Like

Hey there, I am doing the, Dynamic List - User Adds Elements lesson and my code doesn’t seem to be working. When i add the — list.html(""); — line the text box and button disappear on the webpage. I can’t seem to figure out why. Any Ideas??

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <meta charset="utf-8">
    <title>DEMO</title>
  </head>
  <body>
  <h1>Our Favourite Fruits</h1>

  <ol id = "listFruits">
  <ol/>
   <input id = "textbox" type = "text"/>
   <button id = "buttonAdd">Input Your Favourite Fruits</button>

    <script>
        var fruits = ["Apples", "Oranges", "Pineapple"];

          function redrawList(){
            var list = $("#listFruits");
              list.html("");
                $.each(fruits,function(index, value){
                  $("<li/>").text(value).appendTo(list);
              });
            }
            
        redrawList();

      $("#buttonAdd").click(function(){
        var inputt = $("#textbox").val()
          fruits.push(inputt);
            
            redrawList();
        });

    </script>
  </body>
</html>
1 Like

The end tag is incorrect so HTML is in the assumption that every thing below the <ol> is a list item (including the input boxes)

The correct way is this –

<ol id = "listFruits">
    </ol>

This will fix your issue.

1 Like

Ahhh yes, thank you Malik! Complete oversight there from me.