Can anyone out there tell me how to add a class or id property to a
link using link_to_remote? I’ve been banging my head on this for far
too long.
Thanks
Clint
Can anyone out there tell me how to add a class or id property to a
link using link_to_remote? I’ve been banging my head on this for far
too long.
Thanks
Clint
On 3/8/06, Clint P. [email protected] wrote:
Can anyone out there tell me how to add a class or id
property to a link using link_to_remote? I’ve been banging
my head on this for far too long.
I’m not positive, but I think you set them in the html_options hash:
link_to_remote “Delete this post”, { :update => “posts”, :url => {
:action => “destroy”, :id => post.id } }, { :id => ‘link_id_here’ }
That’s what I figured to, but it doesn’t work.
Here’s my code:
<%= link_to_remote ‘Add Partner’,
{:loaded => “new Effect.BlindDown(‘add_partner’)”,
:update => ‘add_partner’,
:url => {:action => ‘new_partner’, :id => @site_id}},
{:id => ‘test’} %>
Is it possible?
On Mar 9, 2006, at 12:58 AM, John wrote:
Why don’t you put the link_to_remote in a div.
… because of this very serious condition: http://en.wikipedia.org/
wiki/Divitis :}
Clint, the example you’ve given is correct:
<%= link_to_remote 'Add Partner',
{:loaded => "new Effect.BlindDown('add_partner')",
:update => 'add_partner',
:url => {:action => 'new_partner', :id => @site_id}},
{:id => 'test'} %>
Just to make sure, i tried it out and it works fine for me. So, make
sure you’re checking in the right place
Sebastian
Why don’t you put the link_to_remote in a div.
… because of this very serious condition: http://en.wikipedia.org/
wiki/Divitis :}
Exactly Sebastian.
Clint, the example you’ve given is correct:
<%= link_to_remote 'Add Partner', {:loaded => "new Effect.BlindDown('add_partner')", :update => 'add_partner', :url => {:action => 'new_partner', :id => @site_id}}, {:id => 'test'} %>
Just to make sure, i tried it out and it works fine for me. So, make
sure you’re checking in the right place
Thanks, I’ll take a closer look.
Clint
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs