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 trialBarb Oladele
1,416 Pointsalert message location
Exercise 2.2
Problem: I cannot get past :it looks like task 1 is not processing message The java script is located in the body of the HTML as instructed and the alert message is before the end of the bottom closing tag. Please point where I am in error.
Sample HTML Task 1 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JavaScript Basics</title> </head> <body> <Script Src ="shout.js"></Script> </body> </html>
Task2
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JavaScript Basics</title> </head> <body> <Script> alert("I DID IT"); </alert> </body> </html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<Script>
alert("I DID IT");
</Script>
</body>
</html>
1 Answer
Steven Parker
231,236 PointsThe JavaScript code is in the wrong place.
The only thing you will add to the HTML in this challenge is the line which will load in the shout.js file. The actual script code will be added to shout.js (on the other tab).
Barb Oladele
1,416 PointsBarb Oladele
1,416 PointsThanks for the help. I moved the alert message from the HTML tab to the JS.tab and it worked. Thanks