I'm trying to get a currency rate with the Google Currency Calculator
using the following jquery (dummy) code:
$.getJSON("http://www.google.com/ig/calculator?hl=en&q=1" + "DOP" + "=?" + "USD",
function(data) {
$('.currNumber').each(function (index) {
$(this).html(parseFloat($(this).html()) * 0.02681);
});
});
XMLHttpRequest cannot load http://www.google.com/ig/calculator?hl=en&q=1DOP=?USD. Origin 'hostURL' is not allowed by Access-Control-Allow-Origin.
Looking in the site I've found various topics on the subject but they mostly refer to local file access and attempt to solve it by starting chrome with an additional parameter (I'm also using chrome) but such is not my issue, which actually seems more related to cross-domain restrictions.
So, question is: How can I use jQuery to get the rate from that url?