Garito,

Yes, I know, Insertion has been deprecated: I wrote that part of doc
along with the source code for Element#insert and the modifications
to  Ajax.Updater to handle these issues.

If you need to insert something between Element 2 and Element 3 you'll
either have to give them an id or use an Ajax.Request.

If element 3 has an id of element_3, your Ajax.Updater code will just
need to be:

new Ajax.Updater('element_3', '/foo.html', { insertion: 'before' });

If you can't give specific ids, you'l' have to use a regular
Ajax.Request with an oncomplete callback:

new Ajax.Request('element_3', '/foo.html', { onComplete: function(t) {
  $$('div.container div.Element')[1].insert({ after:
t.responseText });
} });

that's supposing your response looks like: <div class="Element">some
text</div>

Best,

Tobie


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