Home forums Using CanvasJS getJSON issue

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  Meric 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19932

    Meric
    Member

    Hi there,
    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.

    Méric

    • This topic was modified 1 month ago by  Meric.
    #19935

    Meric
    Member

    OK, going to be resolved : Seems to be an Access-Control-Allow-Origin.

    #19936

    Meric
    Member

    … Access control resolved… but page still blank :’-(

    What am I doing wrong ?

    #19938

    Meric
    Member

    (cannot edit or delete my post, so I post again)
    I try this Sunil tip, always blank.

    #19939

    Vishwas R
    Keymaster

    @meric,

    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.


    Vishwas R
    Team CanvasJS

    #19941

    Meric
    Member

    Understood.
    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.

    Méric.

    • This reply was modified 1 month ago by  Meric.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.