Forum: Ruby on Rails Can't get scriptaculous to work

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Todd S. (Guest)
on 2005-12-29 09:23
I'm just getting up and running with rails, but I'm pretty sure I'm
using the scriptaculous library correctly.  However, when I try to call
an effect I get and endless loop of these errors...

Undefined Value          line 486

I'm using these libraries...
	<%= javascript_include_tag "prototype" %>
	<%= javascript_include_tag "controls" %>
	<%= javascript_include_tag "effects" %>

and calling like so:

<div id="testDiv" onclick="new Effect.Scale(self,.5)"></div>
Mark Reginald J. (Guest)
on 2005-12-29 14:53
(Received via mailing list)
Todd S. wrote:

> Undefined Value          line 486
> <div id="testDiv" onclick="new Effect.Scale(self,.5)"></div>
Did you mean to write "this"? ________________|

We develop, watch us RoR, in numbers too big to ignore.
Todd S. (Guest)
on 2005-12-29 17:37
Mark Reginald J. wrote:

> Did you mean to write "this"?

Thanks for the extra set of eyes.  No, I meant to write "this" instead
of "self".  And that's exactly where the error is.  Switching this fixes
the problem.  Sorry for the red herring.
This topic is locked and can not be replied to.