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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd3a9ca8a116e0055e65dd2d6069c946?d=identicon&s=25 Todd S. (tdog)
on 2005-12-29 08: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>
C64e63b70be7dfed8b0742540b8b27e5?d=identicon&s=25 Mark Reginald James (Guest)
on 2005-12-29 13: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.
Bd3a9ca8a116e0055e65dd2d6069c946?d=identicon&s=25 Todd S. (tdog)
on 2005-12-29 16:37
Mark Reginald James 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.