user3439585
user3439585

Reputation: 87

jQuery | Autocomplete input field fails to display autocompleted value

please check this JSFiddle at first: http://goo.gl/WiY827

After selecting it should display the complete address. Unfortunately this does not happen. Instead there are just the typed in letters shown.

I would really appreciate your help!

thanks

Upvotes: 1

Views: 41

Answers (1)

Adam Merrifield
Adam Merrifield

Reputation: 10407

According to the documentation there is a event for when a result is inserted into the form called geocode:result you need to add that to your code.

http://jsfiddle.net/EcPdP/14/

$("#input-geo").geocomplete().bind("click", function (e){
    e.stopPropagation();
}).on("geocode:result", function(event, result){
    $('#message').html('Your Location:  ' + $('#input-geo').val());
});

Upvotes: 1

Related Questions