I thought this would be fairly simple but it turns out not to work as I thought it would or should.
new Ajax.Updater('myContainer','/url/',{
insertion: {before: 'anotherElementId'}
});
How is this done correctly?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As stated in the docs for
Ajax.Updater:You are passing an object literal, which is why it does not work. The element referred to by the first argument to
Ajax.Updateris the one which will be modified. That’s the whole idea of that method (as a shorthand instead of doing the insert manually in a normal AJAX request callback).So I think what you were aiming for was this: