Here is even more sample to re-produce the bug
<%=link_to_function "Load", do |page|
page.insert_html :bottom, ''current-item'',
(link_to_function("Test") do
|page| page.alert(''test'') end)
end %>
On May 13, 1:46 am, "jack.tang"
<him...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi
>
> I am now facing one odd question. Here is the example.
>
> one page, say foo.rhtml, I try to load partial content when user click
> "Load" button, so the code is
>
> # foo.rhtml
> #
> <%=link_to_function "Load", do |page|
> page.insert_html :bottom, ''current-entry'', :partial
=>
> ''foo_part'', :object => foo_obj
> end %>
>
> In partial _foo_part, there are some actions, say "Send email"
and
> here is my code
>
> # _foo_part.rhtml
> #
> <%=link_to_function "Send mail" do |page|
> page.insert_html :after, "actionrow",
''<li>blabla</li>''
> end%>
>
> However, the generated javascript code seems wrong, in firefox (with
> firbug extension) some errors come out:
>
> missing ) after argument list
> [Break on this error] ef=\"#\" onclick=\"try {\nnew
> Insertion.After("actionrow", "<li>Last
item</li>")...
>
> Please help me. The question has blocked me for 2 days. Thanks very
> much
>
> /Jack
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---