[EMAIL PROTECTED] a écrit :

Hi,
if I update my page and try to use autocompleter does not work.
The same page loaded directly work.
I believe that there is a problem to get the right id.
Any idea or examples how to solve this.

I suppose you mean you have some AJAX-based behavior that replaces a
part of your page where you use Auto-completion?

Basically, any dynamic replacement of DOM fragments that are used by
such features as Draggable/Sortable/Autocompleter/etc. means extra care
is necessary.  Essentially, you would need to use the following sequence:

1. deregister any such behavior (Droppables.remove, Sortable.destroy, etc.)
2. actually replace the DOM fragment
3. Re-create/register the behavior (Droppables.add, Sortable.create, new
Ajax.Autocompleter, etc.).

This is because the features resolve IDs to actual DOM references, and
then keep using those references.  To nodes that get removed from the
DOM by later replacement...  So you need to use freshly-obtained
references, even if those use the same IDs.

'HTH

--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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