Problem with using

HI everybody,

I'm newbie to rails application. I like to use 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>   <script src="javascripts/prototype.js" type="text/javascript"></

  <script src="javascripts/scriptaculous.js" type="text/javascript"></

  <script src="javascripts/effects.js" type="text/javascript"></script>

</head> <body>

<b> Effects </b>

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

<div onclick="new Effect.SwitchOff(this)">     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...

Looks like you forgot dragdrop.js

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

  <%= javascript_include_tag :defaults %>

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