Basically I am showing a table of people and their salary for an assignment, There is a form to submit a name and salary to push the respected values into arrays. But when I hit the submit button, nothing is working.
#I'm having problems displaying my table
9 messages · Page 1 of 1 (latest)
You added an event listener for "submit" to the submit button. That event listener has to go on the form. If you want an event listener on the button, it has to be for "click" and not "submit". Although the button actually performs a submission, there is no submit event for it to listen to. Only the form can listen for a submit event.
so basically switch submit to form
lemme try that
I also switched it from submit to click, it doesnt seem to be making any changes
Put a console log in the event handler to see if it runs.