Wikipedia Viewer link won't run when button pushed

Hi all

I’ve made it through the first few steps of setting up the viewer.
I used the FCC link for the random search.
Now I’m trying to ‘GET’ the information from the input cell to the link for the search function.
I tried the search function with a specific search term and it worked, but when I put it in the js nothing comes back to the console for testing?
I’d appreciate any help, I’ve been stuck on this for hours.

You have a button with id=“search”, yet your jQuery is not trying to reference an id of “search”. It is trying to reference a “search” element and there is no such element. You probably just need to review how to select elements vs classes vs ids with jQuery.

FYI - If you are going to use certain functionality of Bootstrap 3, you need to add jQuery library before the Bootstrap library under the JS module settings section. Currently, you have them added in reverse order.

Thanks I found a couple errors with the id and missing '#'
I still have no output to the console

I tweaked your code and was able to get the API working. Here is my hint to get the basic API call working: the “type” and “dataType” properties would like to have a string paired with them.

1 Like

Thanks so much
As soon as I read the comment, I knew where I needed to make the changes.