So if it makes a difference, I am using JQuery UI. I have a selectbox which is turned into an autocomplete, but I think that I should be able to clear it just like any old select box…
I have tried everything that I have read online:
$("#edit_ts_form_projects").val("0");
$("#edit_ts_form_projects").val(" ");
$("#edit_ts_form_projects nth-option(0).(selected, "selected");//or something like this, cant remember the synax
All of those with a blank first item in the select, with just a space:
<option value=" "> </option>
<option value=""> </option>
<option value="..">..</option>
But no matter what, but selectbox will still have stuff in it (I want the dropdown part to stay intact, I just want to clear the textbox.
Any ideas? Could it be because I am using JQuery UI that this is happening?
Here is the link to the jquery UI control I am using btw:
Try like below,
Where
#comboboxis the ID of the drop down in your original code.DEMO: http://jsfiddle.net/skram/vakKq/1/