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 trialAaron Davis
1,053 PointsWhen trying to preview workspace, it doesn't load the scripts.js file, so nothing is running.
I am trying to follow along with the video, but when clicking preview, nothing is happening because scripts.js isn't being loaded.
1 Answer
Jennifer Nordell
Treehouse TeacherYour workspace previews fine for me but there is an error in your scripts.js. You have written this:
Document.write("<h1>Welcome to Javascript Basics</h1>");
It should be:
document.write("<h1>Welcome to Javascript Basics</h1>");
Note the capitalization of the word "document". Yes, it matters. When the capitalization is changed and the page is refreshed the "Welcome to Javascript Basics" displays on the page. I get the alert popping up for me. If you don't see the alert, make sure you're allowing popups in your browser and try clearing your browser cache.
Aaron Davis
1,053 PointsOk, that part makes sense, initially I was having a problem with it even showing the alert. Once I created that link, I tried opening it and it ran without changing anything and it popped up just fine. So not sure what was going on, but it seems to be working now. I appreciate your help.
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherIt'd be helpful if we could see your workspace. In the top right of the workspace is a camera icon. Take a snapshot of your workspace and then link us the URL so we can take a peek around. At this point, we can't know if it's the code or a problem with the browser.