In one of my view , I have an image the user need to click to close a
if I use :
<img src ="/images/icon_closeitem.gif", size=“16*16”,
border=“0”,alt=“Close Selection”, title=“Close”, onclick="<%=
remote_function(:url => { :controller => ‘property’, :action =>
‘closeSelection’, :id => @property }) %>" >
then it’s ok, in my property_controller.rn
def closeSelection
render :update do |page|
page.replace_html ‘selections’, “”
end
end
will reset the content of the ‘selections’ div to empty… fine
but if I try to use
<%= link_to_remote (image_tag(“icon_edititem.gif” , :size=>“16*16”,
:border=>0, :alt=>“Edit this Property”, :Title=>“Edit this Property”) "
, { :controller => “property”, :action => “delete”,:id => @property },
:class => “additem”) %>
the href is “#” (the onclikc seems to be generated…) the URL is
‘property/#’ and obviously the controller action is not performed…
I surely miss an important parameter… which one ?
kad