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 trialFrank Formica
3,595 PointsWorkspace issues
The script is at the bottom of the page . When I do the alert pops up saying "Here's another message from Treehouse." but then the message itself never appears. Also since I am asking this and can't copy the workspace to this file can someone explain how I do that to show you my work?
Ali Abbas
2,097 PointsHey Frank Formica,
When a code isn't saved properly, this is usually what happens. I think the problem is that you may have saved the code in the '.html' file but not the '.scripts' file. Any new material added must be saved separately in every individual file. I don't know if this is clear, so I'll give an example. If you added an alert message to the '.scripts' file, then saving it won't save any new code added in the '.html' file. You'd have to click on the '.html' file and click on save again to save the code of that file as well. I hope this resolves your issue, have a good day!
2 Answers
ROBERT REVES
2,730 PointsThis code will only run if the scripts are placed in the body not the header. Maybe this works in siri but not in any other browser.
ROBERT REVES
2,730 Points<!-- This is the code that runs on Chrome and Firefox. --> <!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"> <h1>Where to place your JavaScript code.</h1> </div> <script src="scripts.js"></script> <script> alert("Here's another message from Treehouse"); </script> </body> </html>
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsWatch this video to learn about snapshots (which enables you to show your workspace)