# Ajax-update with link\_to\_remote(image\_tag), how to?

**URL:** <https://www.ruby-forum.com/t/ajax-update-with-link-to-remote-image-tag-how-to/90140>\
**Category:** Ruby\
**Created:** [March 26, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/ajax-update-with-link-to-remote-image-tag-how-to/90140 "2007-03-26T12:08:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Post date:** [March 26, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/ajax-update-with-link-to-remote-image-tag-how-to/90140/1 "2007-03-26T12:08:26Z")

</div>

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.
```

---

<div class="post-metadata">

**Author:** ![saravanan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Post date:** [March 26, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/ajax-update-with-link-to-remote-image-tag-how-to/90140/2 "2007-03-26T16:31:28Z")

</div>

> 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.
