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 (Retired) Introducing JavaScript Your First JavaScript Program

Chriss Benitez
Chriss Benitez
2,222 Points

Workspace not working at all.

I'm following the video and whenever i click preview it doesnt show anything, i'm saving the files and I have even put a <h1>Test</h1> on the index.html page. I am using chrome, i have tried on firefox and i works there but why it isn't working on chrome?

This is the code i have tried:

script.js: alert("Hello from treehouse"); document.write("Welcome to Javascript basics");

index.html:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/main.css"> <title>JavaScript Basics</title> </head> <body> <div class="container"> <script src="scripts.js"></script> <h1>Test</h1> </div> </body> </html>

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

If it's working on one browser, but not the other, it's likely that the browser that it's not working on is loading in cached data. Try clearing your browser cache and see if that doesn't clear it up! :sparkles:

Chriss Benitez
Chriss Benitez
2,222 Points

Thx a lot, this solved my problem :D

Daniel Cavalcanti Figueiredo
Daniel Cavalcanti Figueiredo
2,295 Points

For me it is not working in any of the browsers. I cleared the cache, but still nothing. :(

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi Daniel Cavalcanti Figueiredo! Because this solution is not working for you, and you may have different code, I would ask that you submit an entirely new question to the forums. Don't forget to either include your code or a snapshot to your workspace. A snapshot can be made by clicking the camera icon on the upper right hand side of your workspace and linking it to us. Your code can be posted using markdown. Instructions on how to use markdown can be found on the "Markdown Cheatsheet" link at the bottom of the "Add an Answer" section of this page. :sparkles:

Daniel Cavalcanti Figueiredo
Daniel Cavalcanti Figueiredo
2,295 Points

It was my mistake, I was not saving the document before loading. sorry for the trouble.