Wikipedia Project: Event Listeners + Fetch API

Wikipedia Project: Event Listeners + Fetch API
0.0 0


Hit a bit of a wall with this project. If I call the function apiCall by itself then it works fine, as soon as I try and add an Event Listener and then call the function apiCall then the fetch API doesn’t work at all.

For the record - I try and do all the projects using native JavaScript hence why I am not using any JQuery.

Link to project -

Any ideas why this is?


Was a very small thing that I was getting stuck on. I was using <input> for my Submit button which refreshed the page and so wouldn’t take the users’ text input. Simply changing that input button to a <button> made the project work. Now I just need to add styling and I’ll be done :slight_smile: