$ .getメソッドを使用してこのWebサービスからxmlデータを取得しようとしています: http ://www.webservicex.net/currencyconvertor.asmx?op = ConversionRate
データを取得しようとするとエラーが発生します。
サンプルコード:
var FromCurrency = "USD";
var ToCurrency = "JMD";
var url = "www.webservicex.net/currencyconvertor.asmx/ConversionRate?FromCurrency="+FromCurrency+"&ToCurrency="+ToCurrency;
var jqXHR;
alert(url);
jqXHR = $jQuery.get(url,function(data){
alert(data);
})
.success(function() { alert("second success"); })
.error(function() { alert("error"); })
.complete(function() { alert("complete"); });
// Do something here
// Set another completion function for the request above
jqXHR.complete(function(){ alert("second complete"); });