Need help with the Wikipedia View project, no response when clicking on the search result

I was working on the Wikipedia Viewer project. I got the search results displayed on my page. However, when I clicked on one of the results, it didn’t direct me to that particular entry page. I assigned the link to the href attribute. I have no idea why it’s not working. Here’s my code.

I think it is a codepen thing. Using target="_blank" should fix it.

Ben’s suggestion should fix your issue. I just wanted to point out that you have a spelling error in your JS, line 17.

I modified the code but still couldn’t get to the result entry page.

  • <a href= ‘+data[3][i]+‘target="_blank">’+data[1][i]+’


  • ’)

    Have a look at your quotes and spaces. Your code produces the following a tag (screenshot from browser “Elements inspector”):

    Problem solved. Thank you for your help.:grinning::grinning:

    It worked fine with Chrome but failed with Firefox. Tried to add Element Inspector but got warned that the add-on was not compatible with my version of Firefox.