Jquery UI autoload, remote-jsonp.html dosyasını arıyorum. ... Benim konsolunda herhangi isteği göremiyorum .. Bu ajax fonksiyondur ama konsolu açınDataType jsonp ve JSON arasındaki fark
dataType arasındaki fark nedir; "jsonp" ve dataType; "JSON"
$("#city").autocomplete({
source: function(request, response) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
maxRows: 12,
name_startsWith: request.term
},
success: function(data) {
response($.map(data.geonames, function(item) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name
}
}));
}
});
},
aynı etki alanı aynı kökenli isteği için farklı bir alan ve dataType: json
talebi demektir alanlar arası talep içinhttp://jqueryui.com/demos/autocomplete/remote-jsonp.html
Çapraz tarayıcı veya çapraz etki alanı? : s –
@Joy Kesinlikle çapraz etki alanı. –
@Joy – thecodeparadox