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.
Saravanankumar S. (Guest)
on 2007-03-26 14: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.
Senthil K. (Guest)
on 2007-03-26 18: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.