HTTPSページにjqueryオートコンプリート機能を実装しました。これは、InternetExplorerを除くすべてのブラウザーで正常に機能します。
IEを使用している間は、の自動ポップアップリストは表示されず、「すべてのコンテンツを表示」として警告が表示されます。
クロスドメインリクエストにJSONを使用しました。
これが私のコードです:
function zipAutoCompletet(prefix){
jQuery( "#"+prefix+"_zip" ).autocomplete({
source: function (request, response) {
$.getJSON("http://ws.geonames.org/postalCodeSearchJSON",
{ 'postalcode_startsWith': request.term, maxRows: 12, style: "full" },
function(data) {
if(data.postalCodes){
var x = $.map( data.postalCodes, function( item ){
console.log(item)
return {
label: item.placeName + (item.adminCode1 ? ", " + item.adminCode1 : "") + ", " + item.postalCode + ", "+item.countryCode,
value: item.postalCode
}
});
response(x);
}
}
);
},
「すべてのコンテンツを表示」の警告なしにIEでオートコンプリートを有効にするにはどうすればよいですか?
前もって感謝します。