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 trialjosephfinelli
Courses Plus Student 6,388 PointsMy 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.
3 Answers
josephfinelli
Courses Plus Student 6,388 PointsGreat...I'll try that.
Thanks again for your help.
Edited:
That did it!
josephfinelli
Courses Plus Student 6,388 PointsHi 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
15,622 PointsThere 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.
josephfinelli
Courses Plus Student 6,388 PointsI 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
15,622 PointsI use sublime 2, you can download it for free.
Hugo Paz
15,622 PointsHugo Paz
15,622 PointsHi Joseph,
Could you please post your html code here.