I'm trying to make a connection in datasnap using ajax
My code:
var url = 'http://cloud.nooven.com.br:12345/datasnap/rest/TServerMethods1/CriaSessao/'+cpfCnpj+'|'+usuario+'|'+senha;
console.log(url);
$.ajax({
type: "GET",
url: url,
dataType: "json",
success: function(data){
console.log('sucesso');
},
error: function(data){
console.log('erro');
}
});
the page .html
that is accessing ta on the server, so it is as localhost in the variable url
, the error that occurs is this:
XMLHttpRequest cannot load http://cloud.nooven.com.br:12345/datasnap/rest/TServerMethods1/CriaSessao/68243096000152%7CMOACIR%7C123456. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://cloud.nooven.com.br' is therefore not allowed access. The response had HTTP status code 503.
Thank you.