I am trying to implement something similar to Google search where user enter values in textbox and a list of suggested values pops up queried from a database table and when the user chooses a value, only a section of text is pasted on the text box.
User enters: Jo
Suggestion: "John Q - hollywood actor"
"Jo Jo - pop singer"
but when user chooses "John Q - hollywood actor", only "John Q" is pasted on the text box.