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 Introduction to Programming Basics Writing Your Program

My javascript file will not load in Chrome - "Failed to load resource: net::ERR_FILE_NOT_FOUND"

I created a local, desktop folder called "web" and it includes both exercise files: index.html and myscript.js.

The index.html file renders fine in Chrome but the myscript.js file fails to load.

Also, I created the files on a Mac using TextEdit and I noticed their might be character issues using " " marks (UTF-8).

Thanks for your help.

Hugo Paz
Hugo Paz
15,622 Points

Hi Joseph,

Could you please post your html code here.

3 Answers

Great...I'll try that.

Thanks again for your help.

Edited:

That did it!

Hi Hugo,

Here is my index.html code:

<!DOCTYPE html> <html lang=“en”> <head> <title>Introduction to Programming</title> <style> html { background: #FAFAFA; font-family: sans-serif; } </style> <script src=“myscript.js”></script> </head> <body> <h1>Introduction to Programming</h1> <h2>with Javascript</h2> </body> </html>

Hugo Paz
Hugo Paz
15,622 Points

There is an issue with your quotes like you assumed. Its due to textedit being a rich text editor. Try following these steps if you want to keep using it.

I changed the settings in TextEditor, edited my files, re-saved them and I'm still having the same issue. Also, I re-saved them using TextWrangler and that didn't help, either.

Could you suggest another text editor for a Mac? Maybe, I can recreate the files in a new editor and see if that works.

Hugo Paz
Hugo Paz
15,622 Points

I use sublime 2, you can download it for free.