# Problems with scriptaculous

**URL:** <https://www.ruby-forum.com/t/problems-with-scriptaculous/167344>\
**Category:** Rails\
**Created:** [May 6, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/problems-with-scriptaculous/167344 "2009-05-06T21:38:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacechurro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Post date:** [May 6, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/problems-with-scriptaculous/167344/1 "2009-05-06T21:38:08Z")

</div>

for some reason, i am having the hardest time with the simplest possible  
use of a visual effect…

i have done this a million times, and this is first time i have had this  
much trouble.

here’s what i am trying to do:

1. set up a div with a link\_to\_remote that references its containing div  
[1].
2. once some backend processing is done, the generated javascript will  
remove the div[2].

everything works fine… the action gets fired off… everything that  
needs to happen happens.

except…

the div does not PUFF go away…

any help would be appreciated…

thanks!

[1]

,----  
| \<% dom\_id = “desc\_entry\_#{@desc.id}” -%\>  
|  
|

\<%= @desc.desc\_type %\>:  
| \<%= text\_field\_tag “description[#{@desc.field\_desc}]” %\>  
| \<%=link\_to\_remote “remove”, :url =\> {:action =\> “remove\_item”, :desc\_id =\> @desc.id}, :complete =\> visual\_effect(:puff, dom\_id, :duration =\> 0.5 ) %\>  
| 
  
`----

[2]

,----  
|

Short Description:  
|   
| remove  
| 
  
`----

---

<div class="post-metadata">

**Author:** ![spacechurro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Post date:** [May 7, 2009, 1:42am UTC](https://www.ruby-forum.com/t/problems-with-scriptaculous/167344/2 "2009-05-07T01:42:09Z")

</div>

try to:

1. change async mode of ajax to synchronous (to asynchronous:false)

or

1. fire visual\_effect from controller (instead of js) via  
render :update do |page|  
page.visual\_effect :puff,‘dom\_id’  
end

tom

Sergio R. wrote:

> 1. once some backend processing is done, the generated javascript will
> 
> |   
> | )}); return false;"\>remove  
> |   
> `----

# –

Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

# [www.meinlschmidt.com](http://www.meinlschmidt.com) www.maxwellrender.cz www.lightgems.cz

---

<div class="post-metadata">

**Author:** ![spacechurro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Post date:** [May 7, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/problems-with-scriptaculous/167344/3 "2009-05-07T16:13:11Z")

</div>

hmm… for some reason, neither of these work…

this is really perplexing me…

---

<div class="post-metadata">

**Author:** ![spacechurro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Post date:** [May 7, 2009, 4:23pm UTC](https://www.ruby-forum.com/t/problems-with-scriptaculous/167344/4 "2009-05-07T16:23:35Z")

</div>

okay, i found it… i am stupid…

there is a space in the div name…

i removed the space, and it works fine…

i suck…
