Hi everyone If you go HERE you will see a simple autosuggest. If you type G in input field, then appears: Gina Lollobrigida Gilda Montesano I want that clicking on it, the text ( Gina Lollobrigida o Gilda Montesano ) appear in input field ( Now appear CIAO ). And then I want that if the user type a different value from Gina Lollobrigida o Gilda Montesano, then this is delete automatically in input field. Help
The issue is with the PHP response, not the javascript. The response for typing in 'g' is here: http://idiotclip.com/film/lib/search.php?q=g This is what it looks like: <ul> <li><a href="#" onclick="document.getElementById('search-q').[COLOR="Red"]value='CIAO'"; [/COLOR]>Gina <small>Lollobrigida</small></a></li> <li><a href="#" onclick="document.getElementById('search-q').[COLOR="red"]value='CIAO'[/COLOR]"; >Gilda <small>Montesano</small></a></li> </ul> Code (markup): You need to change the php script to make the highlighted parts the same as the returned name. Should be done very easily.