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 trial

JavaScript

Pop-up aint 'poppin up

I am trying to make a cute little javascript pop-up, work. But, it isnt. Please scrutinize the code below... i got it from a video. I use it in enfold-powered wordpress site.

<link rel=”stylesheet” type=”text/css” href= “application.css”> <script type=”Text/javascript”> Alert(‘hello world!’); <script>

5 Answers

Don't capitalize the "a" in alert.

Programming languages are pretty much all case sensitive so when you capitalize Alert, the JS engine doesn't know what function you're actually trying to call.

Your second problem is that you're using backticks instead of single quotes. Didn't notice that at first. The backtick is on the same, top left button on your keyboard as the tilda (~) ... This is not the same as the single quote which is located to the right of the colon/semicolon button. Use the single quote not the backtick. Or just use double quotes.

alert('hello');

go to developer tools and console

another fun command is prompt("type in here");

Odd.

I made the A lowercase but the pop up still didnt pop up. Should i expect it to pop up when i land on the individual page that the code is on-- or when i land on any page of the website?

Odd.

I made the A lowercase but the pop up still didnt pop up. Should i expect it to pop up when i land on the individual page that the code is on-- or when i land on any page of the website?

Where are you putting the code?