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 JavaScript Basics (Retired) Introducing JavaScript Write Another Program

Andrew Geronimo
Andrew Geronimo
379 Points

Open an alert dialog with the message 'Warning!'

I am having trouble with this challenge. I am doing exactly as stated. I am thinking it is just an error somewhere in the system. Can someone confirm? I am always getting the message. "It looks like task 1 is no longer passing". I have kept the script the same other than the src script tag. I have tried several things such as putting the alert in the head tag as well.

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>

</head>
<body>
  <script src=scripts.js.></script>
  <script> alert("Warning!");</script>

</body>
</html>

2 Answers

Andrew Geronimo
Andrew Geronimo
379 Points

I figured it out, for whatever reason, I had to remove the initial script src tag.

Hi, Andrew. What's going on with the value of script tag's src attribute?

Andrew Geronimo
Andrew Geronimo
379 Points

What exactly do you mean?

currently I have this and its still wrong according to them. (Excuse the picture above, I fixed all the syntax with no results) I currently have the script src tag like so without spaces of course

< script src="script.js" > < /script >

Andrew Geronimo
Andrew Geronimo
379 Points

< !DOCTYPE HTML> < html> < head> < meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> < title>JavaScript Basics</title> < /head> < body> < script src="script.js"> < /script> < script> alert("Warning!") < /script> < /body> < /html>

Andrew Geronimo
Andrew Geronimo
379 Points

I just keep getting the "Oops! It looks like Task 1 is no longer passing." error everytime