Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

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

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
5,974 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.