I’ve just started the Wikipedia Viewer project. Although my code works if I replace the API request URL with the weather API I used in the previous challenge, I cannot get the JSON for the Wikipedia API to be displayed in the console. Any advice?
You will have to use JSONP to fix it. It is as easy as adding &callback=? at the end of your url. If you have never heard of JSONP, google it or search this forum for an explanation.
Hmm… my code was working fine yesterday. Today I was just trying to change from “onclick” to “onsubmit” for my button so that the enter key would also work, but now it seems that the API request is having trouble again… Any ideas of what I did wrong?
hi … according to wikipedia documentation , when we want data from outside of domain , eg. let we are at domain example.com and we want to retrive data from example.in , then these browse does not support cross domain data transfer , thats why you are not geting the response…
You just saved the day for me with that bit of advice. I was having the same problem and your solution did the trick. Now on the finishing up this project.