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 Treehouse Club - MASH MASH - CSS Adding CSS to Our Game

Stephen Lamm
Stephen Lamm
6,244 Points

Why am I not getting any output when I type answers into the forms?

I followed through with everything from the MASH:html lesson, but my version doesn't seem to work, when I type my answers into the text forms and continue to click the respective button to supply me with an answer, nothing changes, there's no output, even when I tried doing before I edited any of the flavor text with the original code, I've gone back through the lesson several times to check if there was anything I could have possibly missed, but as far as I can tell I followed every instruction, but clearly I'm doing something wrong.

Also as a side note, when I hover over the hexadecimal colors I don't see a preview of that color, I'm guessing that's because I'm using windows 10 instead of a mac? Not super important but it would be a nice feature to be able to utilize.

If anyone has any advice for either of these it would be greatly appreciated! and of course the former is much more urgent.

Steven Parker
Steven Parker
231,269 Points

If you make a snapshot of your workspace and post the link to it here, we can take a look and help find the issue.

1 Answer

Steven Parker
Steven Parker
231,269 Points

It looks like the "src" attribute of your <script> tag is being set to an empty string. It needs to be set to the name of your script file so it will get loaded and start running:

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

Then, inside the script itself, in the "fill_in_answers" function, there a several references to HTML element with ID's like "profession", "pet", and "location", none of which exist in the HTML file. You'll need to either create them in the HTML, or change the references to refer to things you already have.