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.
David MacDonald919 Points
in script.js nothing is appearing when i use preview. How can i get the alert and header to appear?
I have the index.html file. Preview opens to port80 instead of web. Nothing appears after i enter the statement and command.
Jeff Wilton16,633 Points
There are three things to note, so lets take a look one at a time.
First, your index.html file should load the scripts.js file:
Second, your scripts.js file should have an alert statement and a document.write statement:
Third, when you open the preview window, it should go to port 80 with a URL something like this: http://port-80-i0up09r7h4.treehouse-app.com/
(this URL is unique to me, so use whatever URL opens when you click preview in your workspaces.
If you do all of the above and you still don't see the alert in the preview window, then try doing a hard refresh (Ctrl+Shift+R in Firefox or Chrome) or clear your browser cache.
Hope this helps!
Jay ReyesPython Web Development Techdegree Student 15,936 Points
Also, make sure you disable any AdBlocks you may have running - this is for future readers :)