<%= link_to_function('Add text field', nil) do |page|
page.insert_html :bottom, :group, :partial => 'text'
end
%>
Hi Jeffrey,
that is not the problem (I tried it, anyway); in fact, that
link_to_function ('Add text field') works perfect. The ones that is not
working is 'Add group'. It works just if I remove the 'Add text field'
link_to_function from the partial
Have you tried using firebug to work out what is going on ?(eg is the
partial that is inserted mangled in some way ?)
Do also check that all the dom elements you think should exist are
actually there and that dom IDs are unique.
This is (or I try it to be) a complex forms whose text fields are in
groups, and you can add and remove both text fields and groups. The only
thing that is not working is the "Add group" link_to_function.
Quoting Victor Martin <rails-mailing-list@andreas-s.net>:
Jeffrey L. Taylor wrote:
> Quoting Victor Martin <rails-mailing-list@andreas-s.net>:
>> end%>
>> This way, it does not insert the partial. But, if I remove the
>> "link_to_function", it does insert it!
>
> I am confused. Is the 'group' partial the first bit of code? And the
> second
> piece of code calls it? And what is the contents of the text partial?
>
> Jeffrey
This is (or I try it to be) a complex forms whose text fields are in
groups, and you can add and remove both text fields and groups. The only
thing that is not working is the "Add group" link_to_function.
Interesting. It works for me. If it were my code, I'd double check what is
actually there versus what you've typed into the e-mails AND look at the code
immediately BEFORE the code you've typed or pasted into the e-mails. Look for
extra or missing quotes and braces (AKA squiggly brackets). If you have an
editor that does syntax highlighting/coloring, use it and be sure it agrees
with you on the syntax of your code.