loop through search results in a dropdown menu