JVerstry JVerstry - 5 months ago 13
Javascript Question

How to clear autocomplete selected values?

I have a page with several JQuery autocompletes. I have implemented a button to clear all selected values, but it does not work... I have tried to set

$(...).text("");
but it does not work. Firebugs fails on the line and does not throw any error message. It quits the function.

What is the right way to clear the selected value of JQuery autocompletes, from code?

Answer

Try using $(...).attr("value","");

Hope it works!! Sorry if i have misunderstood the question.

Comments