Im doing my own ajax thing with dropdowns. Ive positioned an imput over a select tag. When stuff is typed into input it collects from db and populates the select menu. Problem is its not noticeable. Is there a way to make the select menu open as if a user has clicked on it?
+2
A:
Nope, you're going to have to use something like a DIV
with overflow: auto
to emulate the behavior of an opened select.
David Hedlund
2010-01-15 13:59:28
A:
The HTML5 <datalist>
element would help out here, but since there are only a few browsers that support it at the moment, you will have to rely on a JS implementation.
The following was the least buggy implementation I could find from a simple Google search
http://dhtmlx.com/docs/products/dhtmlxCombo/index.shtml. It supports Ajax as well as up/down arrow keys.
StackOverflow also uses it's own implementation of auto-complete when you start typing tags, maybe you can get some ideas from looking at the source code?
Andy E
2010-01-15 14:18:02