Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

link_to_remote not calling "complete" (See related posts)

<ul>
<% @items.each do |item| %>
>
<%= link_to_remote(item.name, 
{       
:url => { 
:controller => 'security', 
:action => 'add_security', 
:description => item.name, 
:symbol => item.symbol
},
:update     => {:success=>'indexFundList', :failure=>'notice'},
:position   => :bottom,
:loading    => "loading()",
:complete   => "completeAddIndexFund(request)"
})           -%>
>
<% end %>
>

Comments on this post

bburcham posts on Feb 10, 2006 at 21:16
I think that the last four parameters (:update through :complete) are being interpreted as the "htmlOptions" which isn't what you want. Try this (notice I removed the first "{" and the last "}":
<%= link_to_remote(item.name,
:url => {
:controller => 'security',
:action => 'add_security',
:description => item.name,
:symbol => item.symbol
},
:update => {:success=>'indexFundList', :failure=>'notice'},
:position => :bottom,
:loading => "loading()",
:complete => "completeAddIndexFund(request)"
) -%>
bburcham posts on Feb 12, 2006 at 12:14
Um, now that I look at the original again, I see no problem with it. Strike yesterday's comment.

You need to create an account or log in to post comments to this site.


Related Posts