I try to access a Web API with JavaScript D3 with the following code:
<script>
d3.json("http://oberon.X.ch/X/v0.0.2/labs/X/devices/bela/channels/X?to=2013-10-22T22:56:26.000Z", function(error, data){
if(error) {
console.log(error);
} else {
console.log(data);
}
});
</script>
Unfortunately, it doesn't work. The following error message pops up in the console:
XMLHttpRequest cannot load http://oberon.X.ch/X/v0.0.2/labs/X/devices/bela/channels/X?to=2013-10-22T22:56:26.000Z. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
Does anyone have a solution to this error?