2011-12-12, 00:16
Hi, I'd like to make my own web interface for xbmc and read through the wiki on the JSON-RPC. After that, I wrote a small script as a basis to communicate with XBMC.
When I load this script into Chrome, it tells me that Origin null is not allowed by Access-Control-Allow-Origin and won't execute the request. The problem is that the domain which forms the origin of the request differs from the domain of the resource and that's not allowed.
What I just need is a little 'hello world' example of how to communicate with xbmc and I'll be ready to go.
Thanks in advance!
Code:
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://IP:8080/jsonrpc");
xhr.onload = function(){ console.log(xhr.responseText) }
xhr.send();
When I load this script into Chrome, it tells me that Origin null is not allowed by Access-Control-Allow-Origin and won't execute the request. The problem is that the domain which forms the origin of the request differs from the domain of the resource and that's not allowed.
What I just need is a little 'hello world' example of how to communicate with xbmc and I'll be ready to go.
Thanks in advance!