Hello All, I want to use the Ajax.Autocompleter class together with getSelectionId in order to use the li ID of the chosen selection to initiate further javascript actions. Anyway I would need to transfer additional variables to the getSelectionId function. But as soon as I try to send more variables to it, it does not work anymore:
This is more or less how it works (taken from the documentation): new Ajax.Autocompleter('autocomplete_field', 'autocomplete_choices', '/ some/script', { paramName: 'searchterm', minChars: 5, indicator: 'status_field', afterUpdateElement : getSelectionId }); function getSelectionId(text,li) { alert (li.id + ' ' + 'ticketID'); } And this is what I planned to do: var parameter1 = 'something'; var parameter2 = 'blabla'; var parameter3 = 'anotherthing'; new Ajax.Autocompleter('autocomplete_field', 'autocomplete_choices', '/ some/script', { paramName: 'searchterm', minChars: 5, indicator: 'status_field', afterUpdateElement : getSelectionId (text,li,parameter1,parameter2,parameter3) }); function getSelectionId(text,li,parameter1,parameter2,parameter3) { alert (li.id + ' ' + 'ticketID'); } But this does not work. How can I send additional parameters to the getSelectionId function? Thanks in advance. Best Regards, Benedikt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---