I am trying to get a short list of supervisors into a form based on a
selection "off_name" in an Autocompleter, also in that form.
The code below worked until I added the getOfficerData() function,
passing an index value returned in the <li> as li.id.
I started getting "update not defined" errors in Firebug
with the update($('eventform').oid.value, li.id);" line cited.  $
('eventform').oid is a hidden text field in the form, used just to
the returned index for the selection.

Any ideas on where I've gone wrong? I know I need to dynamically set
the returned value so the second Autocompleter can pass it back in the
next request.

                var auto2 = new Ajax.Autocompleter("off_name", 
                                //tokens: ',',
                                paramName: "value",
                                minChars: 2,
                                indicator: "autocompleter_indicator2",
                                afterUpdateElement: getOffSelectionId});
                var auto3 = new Ajax.Autocompleter("supvname", 
                                paramName: "value",
                                minChars: 1,
                                indicator: "autocompleter_indicator3",
                                parameters: "uidx=" + $('eventform').oid.value,
                                afterUpdateElement: getSupvSelectionId});

                function getOffSelectionId(text, li) {
                holdArray[0] = li.id;
                update($('eventform').oid.value, li.id);
                return holdArray;

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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to