For two days, I have got around lots of forum sites, but I don't find exact solution of my problem. I have cross-site scripting problem. Web services of my application that is written with javascript, html and css get an error like;
"XMLHttpRequest cannot load...bla bla bla..Origin http://localhost:8088 is not allowed by Access-Control-Allow-Origin response header." Code I write is;
$.ajax({
async: false,
type: "GET",
url: "http://www.yem...om/Cata.../M...ogin2?username=blabla&password=blabla123",
dataType: "xml",
success: function(xml) {
alert("CONTROL???");
$(xml).find('Login').each(function(){
var logResult = $(this).find('Result').text();
alert(logResult);
});
}
})
;
I see that I have to use JSONP. But when I write dataType: "*jsonp xml*"
or dataType: "*jsonp text xml*"
, I get an error msg such as "SyntaxError: Parse Error" !
Also, I tried CORS Filter, but it needs web.xml but I don't have it. When I created and tried to work it, I failed!
Moreover, I tried cross domain requests with jQuery by James Padolsey http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/ It works, but I haven't parsed data I receive. This plug-in uses Yahoo Query Language, because of that, controlling the data is different and not easy.
Is there any way left to figure my problem out? Please help me!
Best wishes.