Hi all...
Can we render a partial file while clicking on a link?
I tried the following:
<%= link_to_remote( "Cancel",
:update => "edit_func_spec_div",
:url => {:partial =>
'cipart/show_functional_spec_to_edit'}
) %>
No you can't. link_to_remote generates javascript to make a request to your server. if you want that to render a partial then you need to have an action on the other side that renders that partial.
Can't we directly render a partial file in link_to_remote?
No you can't. link_to_remote generates javascript to make a request to
your server. if you want that to render a partial then you need to
have an action on the other side that renders that partial.
Fred
Thanks Fred.
I have to implement this function in many places. I was trying to avoid
writing many actions for such a simple functionality.
So now i'm planning to write a single action and combine all by checking
conditions.
Thanks again
Suneeta
if you didn't want to use ajax, you could use javascript directly? You
could render the form on the page, hide it, then show it when you
click on your link. e.g: