My P开发者_JAVA技巧HP code generates options from MySQL db table for JQuery-ui autocomplete combobox http://jqueryui.com/demos/autocomplete/#combobox . Code looks like that:
<select id="combobox" name="company">
<option value="">Select one...</option>
<?php
$query=$db->query("SELECT id, company FROM main");
while($row=$query->fetch_object())
{
echo '<option value="'.$row->id.'">'.$row->company.'</option>';
}
?>
</select>
I wonder, is there any way to use Jquery-ui combobox as standard text input if there is no available option? I mean, if there's no option like user typed, I want to allow user to enter new data. Is it possible?
You can try this jQuery plugin for that.
精彩评论