A peek at the docs (http://wiki.script.aculo.us/scriptaculous/show/ 
Ajax.Autocompleter) show the parameter is the selected list element:  
an <li> tag.  Element.value wouldn't work--it doesn't mean anything  
to a list element.

If that doesn't work, tell us what version of Scriptaculous you're  
using, and which brower.  The Scriptaculous source is pretty  
straightforward about calling your custom function with the selected  
element passed. Don't be afraid to dive into the source.

function sayhi (el) {
        alert (el +' : '+el.innerHTML);
}


TAG

On Feb 16, 2007, at 5:02 PM, frank wrote:

>
> How do you pass the selected value to the function?
>
> new Ajax.Autocompleter('text', 'auto', 'file',
> {paramName:'autocomplete',  updateElement:sayhi});
>
> function sayhi(???){
>       alert(???);
> }
>
> I've tried element and element.value but that didn't work.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to