codeforgso / GoVote

Local voter registration and election candidate application.
http://govotegso.org/
GNU General Public License v3.0
24 stars 46 forks source link

Add preventDefault to voter lookup submit #199

Closed SchaeStewart closed 3 years ago

SchaeStewart commented 3 years ago

Description

Add e.preventDefault to voter lookup form submit.

By default HTML forms will try to submit data to the server, and refresh the page. (You don't really see this behavior in most modern development anymore, but in ye-olden-days of the web this was standard). You can prevent the the form from submitting data to the server and refreshing the page by using e.preventDefault, where e is the form submit event in your handler function

MDN for prevent default: https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault

Related Issue

188

How Has This Been Tested?

Tested locally

Screenshots (if appropriate):

Checklist:

PS: Whoever setup the dev environment for this project was an idiot ;)