Thanks for the quick answer, but nothing yet.
Philip Hallstrom wrote:
> record "Element.insert(\"#{id}\", { #{position.to_s.downcase}:
> #{content} });"
>
This is the helper source code, but if you go to the Prototype API you
will see:
> insert(element, { position: content }) -> HTMLElement
So, I understand that you can pass a element. I just can't get the
helper to evaluate the JS code that lead me to the element.
-------------------------------------------
fRAnKEnSTEin wrote:
> sometimes this error happens because the html element that you are
> trying to access using it's id does not load yet. You can check if
> when you try to access $('comments_list').down(0) the element exists
> in the HTML. You can check using the firebug.
The element 'comments_list' exists. It looks like:
<div id="comments_list">
<ul> </ul>
</div>
What I'm trying to do is, add li elements inside of the ul element
without giving it a Id.
Thanks anyway... still looking for the answer.
By the way, someone have done something similar, but did not work for
me. Look at:
http://sentia.com.au/2009/03/using-javascript-code-for-rjs-instead-of-ids/
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---