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!

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 The JavaScript Console

oren tal
oren tal
5,738 Points

why 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?

Let's take a look at your code to evaluate your work so far.

3 Answers

Hmm 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
oren tal
5,738 Points

i try to sent you the code by mark it with the sign ''' before and after. it doesn't work for me...

Try 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
oren tal
5,738 Points
html file -

<!DOCTYPE html>
 <html lang="en">
  <meta charset="utf-8">
  <link rel="stylesheet" href="css/main.css">
  <title>What's wrong with this script?</title>
  <div class="container">
  <h1>Can you get the JavaScript to work?</h1>
  <script src="scripts.js"></script>
js fie-

alert("hello there");
document.write("No it works!");