Ajax-update with link_to_remote(image_tag), how to?


#1

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.

#2

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.