Chrome error - XMLHttpRequest cannot load

Chrome error - XMLHttpRequest cannot load

ppsiriusppsirius Posts: 5Questions: 2Answers: 0

My datatable page working only in firefox :/
https://github.com/ppsirius/json
How i can fix it to open this page in chrome?

Answers

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    Are you using a server to load the file, or file://. Chrome won't allow XHR loading from file:// as that would be a huge security hole. I'd be surprised if Firefox does...

    Allan

  • ppsiriusppsirius Posts: 5Questions: 2Answers: 0

    Problem is even on local, the json file is on the same direction as index.html and script look like this "sAjaxSource": "test.json"

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    I've just tried your package and it works no problem on localhost in Chrome for me without modification.

    Allan

  • ppsiriusppsirius Posts: 5Questions: 2Answers: 0

    I run this on ubuntu and isn't working but when I upload on server it's working :|

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    You have to run it thought a web-server. As I noted above, you can't use the file:// protocol. Allowing Ajax with file:// is a huge security risk.

    Allan

This discussion has been closed.