A simple change to the text field after the jquery auto complete select event has completed. I want to split the data and display it in other text fields. I am trying to do this. This does not change any values at all. What do I need to change here?
$(function() {
$("#term").autocomplete({
source: function (request, response) {
$.post("/users/search", request, response);
},
minLength: 2,
select: function(event, ui){
$('#div2').html(ui.item.value);
document.getElementById('#found').value="test";
}
});
});
Ruby / html -
<%= text_field_tag :found, nil, :maxlength => 11, :size => 20%>
<input id="found" maxlength="11" name="found" size="20" type="text" />
source
share