JavaScript Treehouse Club - MASH MASH - JavaScript Handle Submission and Event Handler Functions

matthew augustine
matthew augustine
2,846 Points

When I am clicking on the submit button , I am not seeing a result o I am confused with the var form section :(

am I supposed to add these lines somewhere else?

// Find the form on the page and attach a handler for when it's submitted var form = document.querySelector('#mash');
form.addEventListener('submit', handle_submission); // Anytime the form is submitted, we want to call the function handle_submission

Adam Beer
Adam Beer
11,269 Points

Show your whole code.

Code

Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.

      ```html
      <p>This is code!</p>
      ```