Home › forums › Using CanvasJS › getJSON issue
This topic contains 5 replies, has 2 voices, and was last updated by Meric 3 months ago.
I’m in pain with a getJSON.
I tried to run this example at home… without success. blank page.
I serve it from my server, and serve the JSON myself… same issue, blank page.
I tried with this tuto, and it works perfectly, so the jquery is correctly running…
I apology for this probably stupid newbie question, but I’m going crazy, and I request for your help.
Thanks for this cool lib.
OK, going to be resolved : Seems to be an Access-Control-Allow-Origin.
… Access control resolved… but page still blank :’-(
What am I doing wrong ?
(cannot edit or delete my post, so I post again)
I try this Sunil tip, always blank.
For security reasons, browsers restrict cross-origin requests. Serving JSON file from local webserver and making an AJAX call to it or serving it from CORS enabled JSON hosting service like myjson.com should work fine. Please take a look at this jsfiddle.
Also can you please check the Browser Console if there are any errors. Also kindly create jsfiddle reproducing the issue so that we can look into it and help you out.
I assumed that my stuff to resolve the Access-Control-Allow-Origin message error bypass this issue, but I misunderstood.
It works, thanks a lot.
Have a nice day, Vishwas.
You must be logged in to reply to this topic.