I have a text element with auto-complete and I want the selected text to pass to a select element.
I use the prototype so at the text element it create a ul list.
How can I take the text of the li?

document.observe("dom:loaded", function() {
new Ajax.Autocompleter("autocomplete", "autocomplete_choices",links,
 {afterUpdateElement : getSelectionId});

function getSelectionId(text, li) {
      var elSel = $('emailuser');
  elSel.options[elSel.options.length] = 
new Option(li.id, li.id  )//want also the li.text

//the li
<ul><li id='1'>text</li></ul>