# Multiple effects during AJAX callbacks

**URL:** <https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947>\
**Category:** Rails\
**Created:** [October 4, 2006, 6:54am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947 "2006-10-04T06:54:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell\_Dsa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@Russell\_Dsa](https://www.ruby-forum.com/u/Russell_Dsa)\
**Post date:** [October 4, 2006, 6:54am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947/1 "2006-10-04T06:54:48Z")

</div>

Hey all,  
I’ve done some searching online and looking through the Agile book but  
can’t seem to find how one can put multiple effects in a single rails  
callback…

As an example:

form\_remote\_tag(:update =\> something\_element,  
:url =\> { :action =\> some\_action }  
:loading =\> do something  
:complete =\> “new Effect…” AND “new Effect”  
)

How would I accomplish adding two effects for the :complete callback?  
(sorry if this is a n00b question)

Thanks,  
Russ

---

<div class="post-metadata">

**Author:** ![Russell\_Dsa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@Russell\_Dsa](https://www.ruby-forum.com/u/Russell_Dsa)\
**Post date:** [October 4, 2006, 7:25am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947/2 "2006-10-04T07:25:37Z")

</div>

Russell Dsa wrote:

> ```
> :complete => "new Effect..." AND "new Effect"
> )
> 
> ```
> 
> How would I accomplish adding two effects for the :complete callback?  
> (sorry if this is a n00b question)
> 
> Thanks,  
> Russ

Checkout RJS. I have a list of sources that should be helpful at the  
bottom of  
[http://blog.mattmargolis.net/articles/2006/06/14/rjs-headache-or-savior](http://blog.mattmargolis.net/articles/2006/06/14/rjs-headache-or-savior)

Matthew M.  
[blog.mattmargolis.net](http://blog.mattmargolis.net)

---

<div class="post-metadata">

**Author:** ![Russell\_Dsa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@Russell\_Dsa](https://www.ruby-forum.com/u/Russell_Dsa)\
**Post date:** [October 4, 2006, 8:23am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947/3 "2006-10-04T08:23:13Z")

</div>

Matthew M. wrote:

> Russell Dsa wrote:
> 
> > ```
> > :complete => "new Effect..." AND "new Effect"
> > )
> > 
> > ```
> > 
> > How would I accomplish adding two effects for the :complete callback?  
> > (sorry if this is a n00b question)
> > 
> > Thanks,  
> > Russ
> 
> Checkout RJS. I have a list of sources that should be helpful at the  
> bottom of  
> [http://blog.mattmargolis.net/articles/2006/06/14/rjs-headache-or-savior](http://blog.mattmargolis.net/articles/2006/06/14/rjs-headache-or-savior)
> 
> Matthew M.  
> [blog.mattmargolis.net](http://blog.mattmargolis.net)

Thanks for the reply Matthew. I am indeed familiar with RJS…I was just  
hoping there was a more “convenient” way of doing it directly in the  
input field.

Russ

---

<div class="post-metadata">

**Author:** ![Russell\_Dsa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@Russell\_Dsa](https://www.ruby-forum.com/u/Russell_Dsa)\
**Post date:** [October 4, 2006, 10:53am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947/4 "2006-10-04T10:53:58Z")

</div>

Ezra Z. wrote:

> On Oct 3, 2006, at 11:23 PM, Russell Dsa wrote:
> 
> > > > Thanks,
> > 
> > Thanks for the reply Matthew. I am indeed familiar with RJS…I was  
> > just  
> > hoping there was a more “convenient” way of doing it directly in the  
> > input field.
> > 
> > Russ
> 
> You can always just put multiple statements in there:
> 
> > > > :complete =\> “new Effect…; new Effect…”
> 
> -Ezra

Sweet, Thanks Ezra!

Russ

---

<div class="post-metadata">

**Author:** ![Russell\_Dsa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@Russell\_Dsa](https://www.ruby-forum.com/u/Russell_Dsa)\
**Post date:** [October 4, 2006, 9:05am UTC](https://www.ruby-forum.com/t/multiple-effects-during-ajax-callbacks/70947/5 "2006-10-04T09:05:43Z")

</div>

On Oct 3, 2006, at 11:23 PM, Russell Dsa wrote:

> > > Thanks,
> 
> Thanks for the reply Matthew. I am indeed familiar with RJS…I was  
> just  
> hoping there was a more “convenient” way of doing it directly in the  
> input field.
> 
> Russ

```
You can always just put multiple statements in there:

```

> > > :complete =\> “new Effect…; new Effect…”

-Ezra
