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 trialMathew Yangang
4,433 PointsLoad external script. I keep getting a syntax error, i don't know why. "shout.js" is the external file
I keep getting syntax errors , and i don't know why
<!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>
6 Answers
Mathew Yangang
4,433 PointsI did . Thanks Anderson. Is working now
Mathew Yangang
4,433 PointsThanks Andersson, is working now
Liam Andersson
1,396 PointsShouldn't it be a "=" between the src and the shout.js?
Liam Andersson
1,396 Pointsand the shout.js in ""
I don't know anything about JS so I'm not surprised if I'm wrong
Sargon Gabriel
2,618 Pointstype in <script src="shout.js"></script> i think that should work
src means Source so wheneve you open a new "src" it needs a "=" followed by quotation marks ("")
Liam Andersson
1,396 PointsAs i stated above
Sargon Gabriel
2,618 Pointsin your code there doesnt seem to be a = sign nor " " after the src ? can you explain to me more ?
Liam Andersson
1,396 PointsI didn't write the <script> code though I wrote that it should be = between the src and the shout.js and that shout.js should be surrounded with "", I guess you didn't read it?
Liam Andersson
1,396 PointsIn words, I described the script: <script src="shout.js"> </script>
Mathew Yangang
4,433 PointsThanks Gabriel, that worked. I typed it as above
Sargon Gabriel
2,618 PointsLiam make sure on the left bar of the workspace that your shout.js is located outside with the index file. if not you need to add a "(input the file name your shout.js is and then add this forward slash and then type in /shout.js"
Sargon Gabriel
2,618 Pointsits like src="filename/shout.js"
Liam Andersson
1,396 PointsI know, But in this case there wasnt a need for that.. I know HTML But not JS. I didnt mean to be rude, I just thought that you didnt give me any credit for Being the First man to the rescue. Thats why i wrote ”As i stated above”. Im sorry if I made you mad. I apologize