hi
im trying to make a searchable dropdown in my site.
i have a textbox and on keypress event it will search the database and show the results.
when i press a result from the list - i want it to be copied to the textbox and the table to be collapsed again (it is collapsed on load).
how can i do it?
another issue i have - that my code is under the onkeypress for the textbox (so it will update the results immidiatly)
the issue is the results are not correct.
for example: if I type ‘A’ i dont get nothing, then when its ‘AB’ i get all the ‘A’ results, then when its ‘ABC’ i see all the ‘AB’ results.
how can I fix this too?
and why there is no ready made searchable dropdown element??