Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Phi Ly
Phi Ly
2,222 Points

Alerts not popping up at all. Is there something I am missing?

1 Answer

Steven Parker
Steven Parker
217,455 Points

The script tag in the index.html file tries to load a resource from "js/script.js", but there is no file in that location.

But there is a "script.js" file in the home folder that would display an alert, so either of these would enable it:

  • remove the "js/" prefix from the src attribute in the script tag
  • move the "script.js" file into the "js" folder
Phi Ly
Phi Ly
2,222 Points

This helped! Thanks! Put the files in the wrong folders.

Steven Parker
Steven Parker
217,455 Points

Phi Ly — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!