# Two Actions for One Click

**URL:** <https://www.ruby-forum.com/t/two-actions-for-one-click/152326>\
**Category:** Rails\
**Created:** [November 2, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/two-actions-for-one-click/152326 "2008-11-02T12:33:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tailormade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tailormade](https://www.ruby-forum.com/u/tailormade)\
**Post date:** [November 2, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/two-actions-for-one-click/152326/1 "2008-11-02T12:33:32Z")

</div>

I have a list where the user clicks on an item and the details about  
that item are shown. Simple. No problem. However, I also need to make  
a javascript call to highlight information in a java applet  
corresponding to the item being displayed. I know I am missing  
something simple, but how can I both display the details and make the  
javascript call to the applet’s API based on that one user click?

---

<div class="post-metadata">

**Author:** ![tailormade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tailormade](https://www.ruby-forum.com/u/tailormade)\
**Post date:** [November 2, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/two-actions-for-one-click/152326/2 "2008-11-02T20:10:27Z")

</div>

On 2 Nov 2008, at 03:32, tailormade wrote:

> I have a list where the user clicks on an item and the details about  
> that item are shown. Simple. No problem. However, I also need to make  
> a javascript call to highlight information in a java applet  
> corresponding to the item being displayed. I know I am missing  
> something simple, but how can I both display the details and make the  
> javascript call to the applet’s API based on that one user click?

assuming this is a link\_to\_remote, one or more of  
the :before, :after, :onComplete or :onSuccess options may be  
appropriate.

Fred
