what i need
- i need to append values in html selected values from autocomplete
code
$('.autocomplete_ind').autocomplete({
lookup: industrys,
onSelect: function(suggestion)
{
console.log(suggestion);
var thehtml = '<strong>industry name:</strong> ' + suggestion.name + ' selected<br> <strong>'+ suggestion.id+'</strong>';
$('#outputcontent').append(thehtml);
$(this ).attr( "value", suggestion.value );
}
html element
<input type="text" autocomplete="off" onChange="make_url();"
id="industry_name" class="biginput autocomplete_ind" name="allindustry" value="">
- i have tried with
- both of solution does not works .
- i like on select values from autocomplete values should be view view source also otherwise value remain empty .
- document.getElementsByName('allindustry')[0].placeholder=suggestion.value;
- $(this ).attr( "value", suggestion.value ); it works like it append value attribute value="somevalue"
- but on view source value="" empty shown.
- any suggestion are most welcome