I am trying to retrieve the data when i call a query to get the nearest Dominoes Outlet.
This is my code for that call :
var echo = function(dataPass) {
$.ajax({
type: "POST",
url: "/echo/json/",
data: dataPass,
cache: false,
success: function(json) {
console.log("It's a success, folks!");
}
});
};
$('.list').live('click', function() {
$.get("http://www.dominos.co.in/outlet?city=AMRITSAR&restaurent=DP66001", function(data) {
var json = {
json: JSON.stringify(data),
delay: 1
};
echo(json);
});
});
Normally if the call is successful, i will get a google map representation of the nearest Dominoes shop . For that I am using Dominoes locator : http://www.dominos.co.in/outlet?city=AMRITSAR&restaurent=DP66001
But, when i run it in fiddle i get the following error :
XMLHttpRequest cannot load http://www.dominos.co.in/outlet?city=AMRITSAR&restaurent=DP66001. Origin http://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin.
FIDDLE : http://jsfiddle.net/YUWB2/154/
Where am i going wrong ?
EDIT : I know this is happening due to Same Origin Policy
, what i want to know is whether there is any alternative way of doing it ?