here is my ajax call
$j.ajax({
url: "http://www.earthtools.org/timezone/40.71417/-74.00639",
dataType: "jsonp",
complete: function(data){
console.log(data);
}
});
the url returns back xml but I need to use jsonp to avoid cross site scripting….any ideas on how to avoid this error
missing ; before statement
[Break On This Error]
<timezone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceS...
-74.00...7653717 (line 2, col 10)
Any ideas…i need the localtime out of this call
you can not get xml cross domain in javascript due to cross domain policies…there are 100’s of similar threads on SO
You can use a proxy if API doesn’t deliver jsonp. Another handy tool is Yahoo YQL. They have a sandbox console can set your url up in minutes and get a YQL url to get data from in choice of xml or jsonp