I am using jQuery to fetch the cross domain data but I am getting this error
SyntaxError: missing ; before statement here is my code
<script>
(function($) {
var url = '//heald-chiampa.tributes.com/funeral_homes/search?json=1';
$.ajax({
type: 'GET',
url: url,
async: false,
contentType: "application/json",
dataType: 'json',
success: function(json) {
alert(json);
},
error: function(e) {
console.log(e.message);
}
});
})(jQuery);
</script>
when I change datatype from jsonp to json then i am getting this error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://heald-chiampa.tributes.com/funeral_homes/search?json=1. (Reason: CORS header 'Access-Control-Allow-Origin' missing).