Are you sure when you are clicking the button you are submitting the form and therefore triggering submit event for which you have added listener?
Here is your list of issues with the application.
- HTML have extra div tag.
- Your JS addEventListener is registering the wrong element with the wrong event type.
Other than that, it works find after I correct it.
Thanks so much for your response, please don’t be offended, can you share me your correction or directly tell me the lines to make corrections. I don’t know why but is very difficult for me to pin point the problem.
From the tutorial I’m learning from, the instructor added the event listener to the book-form instead of the input submit and it was still working for him.
The whole thing is really frustrating me but I must not get tired or think of quitting.
Reason I asked that was to push you in the direction of the answer. Your event listener is for when form is submitted, but your button doesn’t submit the form.
So you need to either need to change the button or change element you add event listener to (and event).