hi i want to get a json file with xhr in xui and my code is this :
function getRequest()
{
x$().xhr('http://localhost:8080/DummyServer/login/request/',
{
callback: function()
{
saveLocalStorage(this.responseText);
},
});
}
I check with safari console, and I got an error like this :
XMLHttpRequest cannot load http://localhost:8080/DummyServer/login/request/. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
but when i use coda ide there is no error, i wonder why. Anyone can help me with this xui.js?
finally i can do that with chrome and i disable the cross-domain security check for AJAX with open the chrome with this : /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security ( in windows ) and all that function run without any error for detail : http://opensourcehacker.com/2010/11/29/disabling-cross-domain-security-check-for-ajax-development-in-google-chrome/