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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 2/24/06, charl souma <charl.souma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> <script type="text/javascript" language="javascript"> > Droppables.add(dropme, {accept: ''dragme'' onDrop: function(element)}); > </script> > <div id="dropme" ></div> >Hello and welcome ! Don''t you forget a comma in your parameters ?
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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Also, doesn''t the "accept" argument refer to classnames? Doesn''t he also have to add the class "dropme" to his dropme div (or get rid of the accept option)? -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Thomas Fuchs Sent: Friday, February 24, 2006 8:35 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] New to Ajax <p align=\"left\"><b><font face=\"Arial\" size=\"2\">GFI MailSecurity''s HTML threat engine found HTML scripts in this email and has disabled them.</font></b></p>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> <Xcript type="text/javascript" language="javascript"><!-- Droppables.add(''dropme'', {accept: ''dragme'' onDrop: function(element)}); --></Xcript> 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 > <Xcript type="text/javascript" language="javascript"><!-- > Droppables.add(dropme, {accept: ''dragme'' onDrop: function(element)}); > --></Xcript> > <div id="dropme" ></div> > > any advice on how to create a droppable area would be awesome > charl > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.