ok, so xmlhttp.responseText will contain a list of names separated by a comma based on the user input.
You then need to change this line
to create either links (<a> elements) or the option elements for a <select> using the names in xmlhttp.responseText
If you decide to use <a>'s then you will need to add an onclick event handler to each <a> to transfer the clicked name to the input box. If you decide to use a <select>, it will need an onchange event handler to transfer the clicked name to the input box.
This sounds like a homework exercise, so give it a go and if you get stuck post back with your updated code and someone will try to help.