I have been trying all kinds of different ways to produce what I think
should be a simple effect, but have not had any luck yet and apparently
I am not following the general idea…
What I am trying to accomplish is the following (part 1 works and part 2
does not):
- One of my views has a link_to_remote which updates a div container
with a table of data
my example is
This works, the page adjusts and the table appears in div_for_stuff
- At the point where the table appears I would like for the above link
to be replaced with a link to clear the table.
I have tried all manner of aproaches for this and just don’t get it, I
have the link_to in its own div container and have tried using a
page.replace_html but the div container does not change.
eg
<%
render :update do |page|
page.replace_html ‘linkdiv’, :partial => “do_clear”
end
%>
in _do_clear.rhtml I have a new link_to which never appears.
I’m confused, can anyone take pity on me and point me to some actual
working code that might do this sort of thing?
Thanks in advance for any help you can provide
-Andy