[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem with script.aculos.us script

Veera Sundaravel

5/12/2007 3:00:00 PM

Hello everybody,

I'm newbie to rails application.

I like to use script.aculos.us script in my app.

I faced the following problem.

1. first i creat my application.
2. Then I copied the files

scriptaculous.js, builder.js, effects.js, dragdrop.js, controls.js and
slider.js
and prototype.js

into my app/public/javascripts/

3. Then included the <%= javascript_include_tag :defaults %> code into
head section of my view file.

4. Then executed the code

<div id="dragDIV" class="green box">drag</div>
<%= javascript_tag "new Draggable('dragDIV')" %>

<div id="helperDIV" class="green box">helper</div>
<%= draggable_element :helperDIV %>

But now I can't drag it. Whats the wrong I did. Can anyone suggest me.

Or is there any code to check whether the javascripts are included
correctly or not.


Regards,
Veeraa

--
Posted via http://www.ruby-....

2 Answers

Gene Tani

5/12/2007 3:49:00 PM

0



On May 12, 8:00 am, Veera Sundaravel <veeraa2...@yahoo.co.in> wrote:
> Hello everybody,
>
> I'm newbie to rails application.
>
> I like to use script.aculos.us script in my app.
>
> I faced the following problem.
>
> 1. first i creat my application.
> 2. Then I copied the files
>
> scriptaculous.js, builder.js, effects.js, dragdrop.js, controls.js and
> slider.js
> and prototype.js
>
> into my app/public/javascripts/
>
> 3. Then included the <%= javascript_include_tag :defaults %> code into
> head section of my view file.
>
> 4. Then executed the code
>
> <div id="dragDIV" class="green box">drag</div>
> <%= javascript_tag "new Draggable('dragDIV')" %>
>
> <div id="helperDIV" class="green box">helper</div>
> <%= draggable_element :helperDIV %>
>
> But now I can't drag it. Whats the wrong I did. Can anyone suggest me.
>
> Or is there any code to check whether the javascripts are included
> correctly or not.
>
> Regards,
> Veeraa
>
> --
> Posted viahttp://www.ruby-....

Here's the rails and prototype/scriptaculous lists (the 2nd is quite
active):
http://groups.google.com/group/rubyon...

http://groups.google.com/group/rubyonrails-spino...


Rob Biedenharn

5/12/2007 6:31:00 PM

0

On May 12, 2007, at 11:00 AM, Veera Sundaravel wrote:
> Hello everybody,
>
> I'm newbie to rails application.
>
> I like to use script.aculos.us script in my app.
>
> I faced the following problem.
>
> 1. first i creat my application.
> 2. Then I copied the files
>
> scriptaculous.js, builder.js, effects.js, dragdrop.js, controls.js and
> slider.js
> and prototype.js
>
> into my app/public/javascripts/
>
> 3. Then included the <%= javascript_include_tag :defaults %> code into
> head section of my view file.

View the source of the page and look at the headers to see what you
get when you ask for :defaults. Is everything you expect to see
actually there?

>
> 4. Then executed the code
>
> <div id="dragDIV" class="green box">drag</div>
> <%= javascript_tag "new Draggable('dragDIV')" %>
>
> <div id="helperDIV" class="green box">helper</div>
> <%= draggable_element :helperDIV %>
>
> But now I can't drag it. Whats the wrong I did. Can anyone suggest me.
>
> Or is there any code to check whether the javascripts are included
> correctly or not.
>
>
> Regards,
> Veeraa

-Rob

Rob Biedenharn http://agileconsult...
Rob@AgileConsultingLLC.com