I have the following JavaScript:
$( "#calculatorFromId" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: "${autosuggestCurrenciesUrl}",
dataType: "json",
data: {
term: request.term
},
success: function( data ) {
response(data);
}
});
},
minLength: 2,
delay: 0,
focus: function(event, ui) {
$( "#calculatorFromId").
val(ui.item.label.replace('ä','ä').replace('ü','ü').
replace('ö','ö').replace('Ä','Ä').replace('Ü','Ü').#
replace('Ö','Ö') + "(" + ui.item.id +")");
return false;
}
The German Umlaut is not correctly displayed. Do you know what value should I pass for the second argument in the replace function ? Every value I pass, it is displayed in the textfield exactly how it was passed. No conversion is done.
Thank you!