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 trialoren tal
5,738 Pointswhy chrome browser doesn't show me alerts in javascript?
I have just started the javascript basics course, following the instructions but the preview at the workspace isn't showing me the alerts functions... what might got wrong?
3 Answers
Anthony Mejia
8,840 PointsHmm your code seems fine. If the only thing that doesn't work are the alert functions, then the problem may lie in your browser.
Do you recall if, at one point, you've checked the "prevent this page from creating additional dialoug" option that appears in alert boxes? If so, your browser is preventing workspaces from showing alert dialogues. To fix this, try closing your browser and opening it up again.
Let us know if you're still running into this problem.
oren tal
5,738 Pointsi try to sent you the code by mark it with the sign ''' before and after. it doesn't work for me...
Anthony Mejia
8,840 PointsTry using these ``` they're different than the normal quote marks. You can copy and paste them from this comment if you'd like.
oren tal
5,738 Pointshtml file -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css">
<title>What's wrong with this script?</title>
</head>
<body>
<div class="container">
<h1>Can you get the JavaScript to work?</h1>
<script src="scripts.js"></script>
</div>
</body>
</html>
js fie-
alert("hello there");
document.write("No it works!");
Anthony Mejia
8,840 PointsAnthony Mejia
8,840 PointsLet's take a look at your code to evaluate your work so far.