error Access-Control-Allow-Origin
Hi, I have the exact same json file as provided on your server. only problem is, I get this message:
Unable to open file http://pacomprojects.be/wowsync/pivot/data.json?433405660.
It seems that this file doesn’t exist or ‘Access-Control-Allow-Origin’ header is absent in the resource requested.
I can see the file in the browser and it has reading rights.
5 answers
Hi Michael!
Could you please check if DevTools (press F12) has any error message?
Thanks
You can also get this error if your data can’t be parsed for whatever reason. I would recommend checking you can use the example data in the docs first, then after than use your own custom data.
Hi,
Thanks for the info.
I did an extra, I wrote a script in javascript (ajax) that calls the php file.
Problem was solved after.
anyone help , how to use ajax in
reportData='<?php echo $FilterReport ?>’;
var pivot = new WebDataRocks({
container: “#wdr-component”,
height: 395,
toolbar: true,
report: reportData
});
Hi,
I think the possible issue here is the asynchronous nature of ajax call. That means you won’t have reportData
loaded when it comes to new WebDataRocks
execution.
In such a case, you should either create WebDataRocks instance when you are totally sure that reportData
is loaded or inject the reportData
into WebDataRocks
instance when reportData
is ready.