You need to add quotes for the first parameter to Droppables.add, plus
you have to define the element first, then issue the JavaScript call.

<div id="dropme" ></div>
<script type="text/javascript" language="javascript">
Droppables.add('dropme', {accept: 'dragme' onDrop: function(element)});
</script>

Cheers,
Thomas

Am 24.02.2006 um 12:03 schrieb charl souma:

Hello,

I'm very new to ajax and was looking for advice on scriptaculous at their website and they suggested i join your mailing list, I hope that was the right thing to do, I haven't installed ROR yet but i have downloaded the needed one-click installer which i will setup sometime soon, until such time i would like to work with scriptaculous in its native form in php files, the scriptaculous website hasn't got sufficient information for a new comer like myself to get off the ground and start working with complex functions like droppable, draggable etc, so maybe some one can give me some tips, i have created a draggable div(dragme) it works, and I would like to create a droppable div(dropme) to hold 'dragme' similar to the shopping cart demos, but the code examples i have found aren't working. the code i'm using goes like this
<script type="text/javascript" language="javascript">
Droppables.add(dropme, {accept: 'dragme' onDrop: function(element)});
</script>
<div id="dropme" ></div>

any advice on how to create a droppable area would be awesome
charl
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to