I use jquery autocomplete for two fields: Country and State. I want the state list to match the value of the country, and I get this too.
My problem is that autocomplete status also shows the result of a previous search in a country. I know this is due to the result of the jquery cache.
Someone please call me how to solve this problem.
My code is below
$('#khk_adressen_LieferLand').autocomplete("/countries/auto_complete_for_countries_list",{
flushCache: function() {
return this.trigger("flushCache");
}
});
$('#khk_adressen_LieferPLZ').autocomplete("/postals/auto_complete_for_postals_list", {
flushCache: function() {
return this.trigger("flushCache");
},
extraParams: {
country_name: function() { return $("#khk_adressen_LieferLand").val(); }
}
});
Thansk in advance
source
share