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

i type the <script> and other information like in the video but when i refresh the webpage it doesnt have the massage

i type the <script> and other information like in the video but when i refresh the webpage it doesnt have the massage

Yunghung Chen, I had the same problem it turns out that I didn't save both files (script.js and html)

hi Washington Simelane i tried that like save the files but still when i refresh i didnt do anything to the website thank you

Clayton Bailey
Clayton Bailey
1,453 Points

I am having this same issue. In the index.html file I have the <script scr="js/script.js"></script> and in the Scripts.js file I have the alert("Hey, you're back for more?"); I have saved both files and when I click the preview button and hit refresh it doesn't seem to execute because the dialog box doesn't appear. Any Ideas?

1 Answer

You have to make sure that script.js is in the js folder or else it won't be able to find script.js. I was running into that issue as well. I don't know if this solution will work for you.

Jabari Peterson
Jabari Peterson
4,187 Points

Thanks Raymond. This helped a lot.