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 trialNatasha Scott
3,750 PointsIt is not clear why answer is wrong. I can't tell if its me or the browser module again! (&%#*&&())*((_)!!!!
Can someone point out the problem with my answer vs what the question is?
SIDE NOTE: As I progress through the coursework I find I have a difficult time trying to understand the problems being asked. Looking at the questions posted about comprehension, I know I am not alone.....
On top of that - navigating this forum without having the correct name of the challenge posted clearly on Challenge Task, makes looking for answers a major time wasters. Some at Treehouse needs to apply some UX design to this entire area.
<end rant>
let 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>
2 Answers
Seth Kroger
56,413 PointsThe question is asking for the text that is currently typed into the input field. You have the input element selected which is good, and the first step to getting the value. The next step is to narrow that down from the entire element to just the specific property we want.
Natasha Scott
3,750 PointsUPDATE: The system will not save my changes. #bootreehouse So here are my updates incl question:
This is the challenge question: Store the value of the text input element in the variable inputValue. (If you need a refresher on getting the value of a text input, this video from the previous section demonstrates how.)
Natasha Scott
3,750 PointsNatasha Scott
3,750 PointsOkay, so what about...
let inputValue = document.getElementbyId("linkName"); inputValue = inputValue.value;
Seth Kroger
56,413 PointsSeth Kroger
56,413 Points"By" needs to be capitalized.