Thank you for your solution. Now my form removes Ajax.Autocompleter when I
remove a form element.

On Thu, Apr 29, 2010 at 11:49 PM, Sébastien Gruhier <sgruh...@gmail.com>wrote:

> Hi
>
> I'll add a Ajax.Autocompleter#release method like this.
>
> Ajax.Autocompleter.addMethods({
>  release: function() {
>    this.element.stopObserving();
>  }
> });
>
> http://gist.github.com/384853
>
> On Apr 29, 2010, at 7:29 PM, kimbaudi wrote:
>
> > Hi, I have a form with multiple text inputs (i.e. <input type="text"
> > name="list_1" id="list_1"> ... <input type="text" name="list_5"
> > id="list_5">) which all have Ajax.Autocompleter initialized. Now when
> > I remove any of these autocompleting text inputs from the DOM, I want
> > to stop observing events on these elements. However, Scriptaculous
> > does not provide a way to unregister all the events that are handling
> > the Ajax.Autocompleter for a particular element.
> >
> > I want to know if I should unregister all the events that are handling
> > the Ajax.Autocompleter for a particular element by using
> > Event.stopObserving() on that element or some other method?
> >
> > I don't want to resort to modifying Prototype or Scriptaculous and
> > would prefer not to have to extend Ajax.Autocompleter class just for
> > this task.
> >
> > Thanks.
> >
> > --
> > 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
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> >
>
> --
> 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
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to