JavaScript JavaScript Basics Hello, JavaScript! Add JavaScript to HTML

not secure warning not letting me see the result of my code

not secure warning in address bar not letting me run code

3 Answers

Lukasz Milde
Lukasz Milde
3,377 Points

File SCRIPT.JS must be nested in JS folder, otherwise SRC address is wrong.

Mel Rumsey
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Mel Rumsey
Treehouse Staff

Hey Ryan mine comes up as not secure too, but the code still runs. If you haven't already, try opening it up in a different browser. Otherwise if that doesn't work let's take a look at the code and see if we can figure it out :)

I tried in a different browser with the same result.

//index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JavaScript Basics</title> <link href="css/style.css" rel="stylesheet"> <script src="js/script.js"></script> </head> <body> <main> <h1>Hello, JavaScript!</h1> </main> </body> </html> // --------------------------------- //script.js file code

alert("Hey, you're back for more?");

Tara Shepersky
Tara Shepersky
4,739 Points

I've got the same problem as Ryan. I tried this in both Chrome and Safari: I'm getting a black, blank page, and a "not secure" warning in the address bar.