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
Ismail Alarmouti
Courses Plus Student 1,598 PointsI've been going over my workspaces for hours now and I can't figure out why the submit button wouldn't run the function?
would you please help me? thanks
Ismail Alarmouti
Courses Plus Student 1,598 PointsPhilip Gales just did that, thanks !
1 Answer
Philip Gales
15,193 PointsWhen you right-click the page to "inspect" and then look at the "console" tab it tells you there is an error on line 61. More specifically
Uncaught SyntaxError: Unexpected token ; script.js:61
Remove the semicolon, leave it blank, and then everything runs.
'fightingstyle': get_answer('fightingstyle')
Philip Gales
15,193 PointsLet me know if you have further problems. I hope this helped you!
Ismail Alarmouti
Courses Plus Student 1,598 PointsPhilip Gales Thank you it did work and run the function! and thanks for the tip of using the inspect tool! but although it did run the function, for some reason it's displaying the answers of two different questions as the same answer, as in if you fill in the inputs with text, the "where you live" and "your fighting style" display the same answer, (for example you live in the UK and your fighting style is UK) here's an updated snapshot of the code .
Philip Gales
15,193 PointsLine 48 in script.js
fightingstyle.innerHTML = answers.location;
I won't tell you what it is supposed to be, only that the other lines above it are correct.
Ismail Alarmouti
Courses Plus Student 1,598 PointsPhilip Gales oh great it worked! much appreciated!
Philip Gales
15,193 PointsPhilip Gales
15,193 PointsIn the upper right of your workspace there is a camera icon that says "Snapshot Workspace". Click that and then share the link. They included the snapshot to make it easy to share large chunks of code, otherwise, it will take a long time for someone to go through your question and piece together the code.