Top19 Top19 - 1 year ago 63
JSON Question

jQuery not returning JSON despite getting it back via the browser

I can't get the following lines of code to return JSON, or even to run my simple alert() function embedded inside. I know the URL is correct, because when I paste it in the browser it returns JSON. Does anyone know what could be the problem here?

I've tried this in CodePen and JSFiddle (making sure to include jQuery) on Chrome, but no such luck.

, function(data) {

Answer Source

You have a missing & in your querystring. Change:




See JSFiddle

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download