FAC-Sixteen / Week6-project-Onions

Week 6 database project
https://lost-and-fac.herokuapp.com/
0 stars 1 forks source link

prevent default on "event"? #23

Open hrmstockdale opened 5 years ago

hrmstockdale commented 5 years ago

disclaimer I am not totally sure about the following:

The (line 30 index.html) html attributes, method and action, link the users input to the router, to the handler, to the database query etc.

Do you want the page to refresh when I click submit?

If no - you may have to write a short event listener in the script.js only to include event.preventDefault() on a submit event (even though the "submitting" is already routed directly by the html).

=)

lucyewright commented 5 years ago

If you do this you will have to make sure to tell the submit button what you would like it to do in place of its default functionality