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.

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

Ilhyun Jo
Ilhyun Jo
6,288 Points

I did exactly what the instructor did but when I clicked the preview button a new tab appeared but nothing happened.

I wrote alert("Hello"); document.write("<h1>Hello"); and there wasn't an alert or anything written in the new tab.

7 Answers

Restart the browser/tab. Or choose an other browser. Usually it works, but I also had some JS problems with chrome

Ilhyun Jo
Ilhyun Jo
6,288 Points

Thanks I changed to safari and it works. Not sure why it doesn't work on chrome.

jason chan
jason chan
31,005 Points

Clear browser history or icognito. Cache is developers number 1 enemy! You'll see it networking, everywhere. LOLs.

There are way too many questions revolving around the same problem. Treehouse, the bug is 99% likely to be on your end. Let us know when you've resolved it.

Clovis Shropshire
Clovis Shropshire
7,139 Points

Exactly. On the other hand, it did work for me on Windows Chrome, just not on Mac version.

Raphael Reiter
Raphael Reiter
6,820 Points

I tried on Chrome, doesn't work. cleared history, doesn't work. tried on safari, still nothing....

Brandon Schabell
Brandon Schabell
3,846 Points

I've had this issue on a number of Treehouse courses. I believe there is a delay between saving and the actual remaking of the preview webpage. Save, wait 60 seconds, then try to preview it again. It seems to get worse during peak hours.

Clovis Shropshire
Clovis Shropshire
7,139 Points

I agree with Brandon. Seems to be working fine now.