# Problem with using script.aculos.us

**URL:** <https://discuss.rubyonrails.org/t/problem-with-using-script-aculos-us/12961>\
**Category:** rubyonrails-talk\
**Created:** [May 15, 2007, 4:53am UTC](https://discuss.rubyonrails.org/t/problem-with-using-script-aculos-us/12961 "2007-05-15T04:53:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veeraa](https://avatars.discourse-cdn.com/v4/letter/v/a8b319/32.png) [@Veeraa](https://discuss.rubyonrails.org/u/Veeraa)\
**Post date:** [May 15, 2007, 4:53am UTC](https://discuss.rubyonrails.org/t/problem-with-using-script-aculos-us/12961/1 "2007-05-15T04:53:54Z")

</div>

HI everybody,

I'm newbie to rails application. I like to use script.aculos.us script in my app.

In that I can't drag the items using script.

This is the code I used inside my .rhtml file.

\<html\> \<head\> &nbsp;&nbsp;\<script src="javascripts/prototype.js" type="text/javascript"\>\</

> 

&nbsp;&nbsp;\<script src="javascripts/scriptaculous.js" type="text/javascript"\>\</

> 

&nbsp;&nbsp;\<script src="javascripts/effects.js" type="text/javascript"\>\</script\>

\</head\> \<body\>

\<b\> Effects \</b\>

&nbsp;&nbsp;\<div onclick="new Effect.SwitchOff(this)"\> &nbsp;&nbsp;&nbsp;&nbsp;Click here if you've seen enough. &nbsp;&nbsp;\</div\>

\<div onclick="new Effect.SwitchOff(this)"\> &nbsp;&nbsp;&nbsp;&nbsp;Click here if you've seen enough. \</div\>

\<b\> Drag and Drop \</b\>

\<div id="dragDIV" \>drag\</div\> \<%= javascript\_tag "new Draggable('dragDIV')" %\>

\<div id="helperDIV" class="green box"\>helper\</div\> \<%= draggable\_element :helperDIV %\>

\</body\> \</html\>

And i have the files scriptaculous.js, builder.js, effects.js, dragdrop.js, controls.js and slider.js and prototype.js in my app/public/javascripts/

\<b\> Effects \</b\> is working well. But \<b\> Drag and Drop \</b\> is only not working well. I cant drag the the above things. And in my development.log its fetch the above 6 javascripts. I mean it includes the .js files into my app. But still its not working. Any other suggestion. Or I missed any code to enable the drag function.

Regards, Vikki...

---

<div class="post-metadata">

**Author:** ![Bob\_Showalter](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@Bob\_Showalter](https://discuss.rubyonrails.org/u/Bob_Showalter)\
**Post date:** [May 15, 2007, 1:20pm UTC](https://discuss.rubyonrails.org/t/problem-with-using-script-aculos-us/12961/2 "2007-05-15T13:20:42Z")

</div>

Looks like you forgot dragdrop.js

I suggest you use the Rails helper to pull in the scripts:

&nbsp;&nbsp;\<%= javascript\_include\_tag :defaults %\>

That pulls in all the prototype and scriptaculous scripts, so you don't forget anything.
