|
[Rails] Re: Page.insert_html using element select instead of id?: msg#03332RubyonRailsTalk
> 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? Don't think that's going to work... check out the source for the insert_html method. It has the following line: record "Element.insert(\"#{id}\", { #{position.to_s.downcase}: #{content} });" So your page.literal isn't going to do any good as the method is wrapping it in double quotes... Doesn't seem like it would be hard to modify to do what you want though... -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |