# Script.acul.us not working as expected

**URL:** <https://www.ruby-forum.com/t/script-acul-us-not-working-as-expected/76847>\
**Category:** Rails\
**Created:** [November 21, 2006, 6:28pm UTC](https://www.ruby-forum.com/t/script-acul-us-not-working-as-expected/76847 "2006-11-21T18:28:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 21, 2006, 6:28pm UTC](https://www.ruby-forum.com/t/script-acul-us-not-working-as-expected/76847/1 "2006-11-21T18:28:11Z")

</div>

I’ve got:

\<%= javascript\_include\_tag :defaults %\>

in my layout.

In the first case I have a form with button\_tag:

radio\_button(‘subject’, ‘valid\_number\_T’, ‘T’, ‘id’=\> ‘valid\_number\_T’,  
‘onclick’ =\> “Effect.SlideDown(‘call-details’)”)  
radio\_button(‘subject’, ‘valid\_number\_F’, ‘F’, ‘id’=\> ‘valid\_number\_F’,  
‘onclick’ =\> “Effect.SlideUp(‘call-details’)”)

In the second case, non-form field is used with link\_to\_remote:

link\_to\_remote “+”, :visual\_effect =\> :toggle\_blind

No javascript errors are thrown, the source looks sound, tested on both  
Firefox 2.0 and Safari, but the effects are not fully working.

In both cases, the div in question is hidden or shown. But the effects  
only work some of the time or not at all. I’ve tried using  
visual\_effect method, putting them in the onclick option of the tag and  
so on.

Are the libraries considered beta’sh or more for example then function  
or am I fudging the works up somewhere?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 21, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/script-acul-us-not-working-as-expected/76847/2 "2006-11-21T18:48:15Z")

</div>

How fast is your computer and how much stuff is underneath the  
call-details  
div? Javascript effects are very processor intensive, especially when  
there  
are also a lot of items to move into place of the now invisible element.  
You  
can assume that [Script.aculo.us](http://Script.aculo.us) works, but you can’t assume that the  
effect  
will always work based on how well your machine can handle the code.

Jason

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 21, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/script-acul-us-not-working-as-expected/76847/3 "2006-11-21T18:58:18Z")

</div>

The system is definately not the issue. Like 3g of ram, year old dual  
g5 powermac.

typical div contents would be about 5 lines of:

6:00-6:30pm Class Name InstructorName

or about 8 form tags depending on the app.
