logo       

[Rails] Re: Page.insert_html using element select instead of id?: msg#03334

RubyonRailsTalk

Subject: [Rails] Re: Page.insert_html using element select instead of id?


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.



On 31 jul, 17:27, David Sousa <rails-mailing-l...@xxxxxxxxxxxxx>
wrote:
> Hello there,
>
> I'm trying to do something like in a rjs file:
>
> page.insert_html :bottom, page.literal(" $('comments_list').down(0) "),
> :partial => "comments/comment_list", :object => @comment
>
> The problem is that I always get this error: "RJS error: TypeError: null
> has no properties"
>
> Sometimes I can't understand rjs.
>
> Any ideas?
>
> David Sousa
> --
> Posted viahttp://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 rubyonrails-talk@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise