Hi everyone, I am creating the “wikipedia viewer”
Unfortunately, I cannot get any data from wikipedia. I used jQuery and Ajax,
I believe what I wrote is quite correct but eveidently I am wrong, anyone that can give me some tip/explanation ?
Much appreciated, already spent a lot of time on that and cannot figure out
Browser consoles are the best way to check for errors.
1)dataType: json,
you are supposed to have quotes around json like this "json"
2)In your url it should be https
instead of http
3)Change action=parse
to action=opensearch
because we want to search the wikipedia using open search protocol.
And finally term
to search
in the url.
Change these and you are good to go .check your codepen console it will have the necesary data .
1 Like
Thanks a lot for the thorough explanation!
Now it is much clearer!
Appreciate it