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 trialJohn Lambert
2,433 PointsJavaScript and the DOM challenge task 1 of 2 is not working. var inputValue = document.getElementById('linkName');
var inputValue = document.getElementById('linkName'); is the correct way to call the element but it still says that it is wrong when I check my answer. Is there a technical issue with this exercise? I verified with 3 separate sources that this is how it's done.
var inputValue = document.getElementById('linkName');
<!DOCTYPE html>
<html>
<head>
<title>DOM Manipulation</title>
</head>
<link rel="stylesheet" href="style.css" />
<body>
<div id="content">
<label>Link Name:</label>
<input type="text" id="linkName">
<a id="link" href="https://teamtreehouse.com"></a>
</div>
<script src="app.js"></script>
</body>
</html>
John Lambert
2,433 PointsThank you so much Jess W. I was struggling with this for a bit. I don't know how I overlooked that.
Jess W
9,490 PointsJess W
9,490 PointsIf I'm looking at the right question, it's asking you for the value of what's in the input field. You're correctly selecting the element, but you need to get at the value.
I got tripped up on this too, and think it could use a better error message.