I m try to write ajax get by using jquery in jsp file. But it always gave error message. I could`nt find the error in my method.
This is my ajax function. Please help me.
<script type="text/javascript">
$.ajax({
url: "http://crowderia.cloudapp.net/ichainwsDev/api/rest/json/product.list",
type: "GET",
data: '{"partyid":4}',
contentType: 'application/json; charset=UTF-8',
dataType: 'json',
success: function(msg){
alert("success : "+data);
},
error:function(msg){
alert("failure");
}
});
</script>
Error is : XML HttpRequest cannot load http://crowderia.cloudapp.net/ichainwsDev/api/rest/json/product.list. No 'Access-Control-Allow-Orgin' header is present on the requested resource. Orgin 'http:// localhost:4040' is therefore not allowed access