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

I'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

https://w.trhou.se/9oaueauozq

In 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.

Philip Gales just did that, thanks !

1 Answer

When 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') 

Ismail Alarmouti,

Let me know if you have further problems. I hope this helped you!

Philip 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 .

https://w.trhou.se/abz10llqbi

Line 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.

Philip Gales oh great it worked! much appreciated!