cross domain jquery ajax call
I am making a get request from web service which is hosted into another domain.
script>
$(document).ready(function () {
$('#submit').click(function () {
$.ajax({
type: "GET",
dataType: "json",
url: "http://idsdesk118/CheckinServices/default.aspx",
contentType: 'application/json; charset=UTF-8',
success: function (data) {
alert(data[0].Age);
},
error: function (e) {
alert('Error121212: ' + e);
}
});
});
});
</script>
The response is always an error.
How do i make use of JSONP and parse the data once obtained?
How do I get the response on the first place.
Any help would be appreciated. Thanks in advance.