autocomplete input show value even value is empty -


i have input autocomplete.

<input type="text" class="form-control input-sm isfieldvalueempty tooltip"  style="width:779px;" id="searchk" name="keywords" value=''> 

everything works good, set value of autocomplete , after add value autocomplete hidden input (user can choose many value autocomplete). when add value , try set empty value of autocomplete input:

$("#searchk").attr("value",""); 

in input field still have text, value od input empty (checking firebug).

any idea how delete text?

i found solution

 $(this).val('');      return false; 

and input clear.

don't use attr() change value, use val()

$("#searchk").val(""); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -