Forum: Ruby ajax-update with link_to_remote(image_tag), how to?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eb6aa3fbe7b161e17b42d415deea3e1a?d=identicon&s=25 Saravanankumar Saravanakumar (saravanan)
on 2007-03-26 12:08
Hi,

I have a image.
link_to_remote(image_Tag...) with update option.
Its working.
But, i cant get the next image what i want to display after click this.
How to do it?

what i code it(If i click the link)?


render_text link_to_remote(image_tag('notlocked.gif', :border => "none",
:title => "Not Locked - This game is free to be swapped." ), :update =>
'lockky', :url => {:controller => 'games', :action => 'toggle_tradable',
:id => item.id})

It is not coming?
Please help me how to do it?


                       with regards,
                        saravanan.
1bca5a134d11ebff03d7f0c8294acbbf?d=identicon&s=25 Senthil Kumar (senthil_rec83)
on 2007-03-26 16:31
>
> render_text link_to_remote(image_tag('notlocked.gif', :border => "none",
> :title => "Not Locked - This game is free to be swapped." ), :update =>
> 'lockky', :url => {:controller => 'games', :action => 'toggle_tradable',
> :id => item.id})
>


you can call a javascript function in :complete option of your
link_to_remote and you can manuplate the image inside the javascript
function by changing its src value.
This topic is locked and can not be replied to.