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
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
, wheree
is the form submit event in your handler functionMDN 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 ;)