Easy to solve your unhappyness because other people use the "$$"
function while you just use the "$" function from prototype. $$
('#comments_list ul') is waht you need to add, obviously.
Easy to solve your unhappyness because other people use the "$$"
function while you just use the "$" function from prototype. $$
('#comments_list ul') is waht you need to add, obviously.
Hi chosen, thanks for your attention but did not work as well.
chosen wrote:
> Easy to solve your unhappyness because other people use the "$$"
> function while you just use the "$" function from prototype. $$
> ('#comments_list ul') is waht you need to add, obviously.
Have you tried using page.select ? it yields those elements matching
the selector you pass it.
I thank you for your help. But I think I will just put an id to the ul
element and solve the problem. RJS and prototype is difficult and poorly
documented, I can't understand the true advantage behind rjs and pro.
Prototype is fine, but RJS can only do so much. Nothing wrong with
ditching RJS if you need more than it can give.
On Aug 11, 5:23 pm, David Sousa <rails-mailing-l...@andreas-s.net>
wrote:> > Element.insert("#<ActionView::Helpers::JavaScriptVariableProxy:0x7f97a1c5eb 18>"...
> So the JS can't find the element.
> I thank you for your help. But I think I will just put an id to the ul
> element and solve the problem. RJS and prototype is difficult and poorly
> documented, I can't understand the true advantage behind rjs and pro.
Prototype is fine, but RJS can only do so much. Nothing wrong with
ditching RJS if you need more than it can give.
oh, and page.literal("$$('#comments_list ul')") may not have worked
because $$('#comments_list ul') returns an array whereas insert is
probably expecting a single element. $$('#comments_list ul')[0] might
work better.
But, if the $$( '#comments_list ul').first code is inside "", the code
will never be evaluated and the insert function will always look for a
element with and id like: $$( '#comments_list ul').first