search for: ondrop

Displaying 20 results from an estimated 53 matches for "ondrop".

2007 Jul 05
1
onDrop don't fires
Hi! As in http://groups.google.es/group/rubyonrails-spinoffs/browse_thread/thread/bbd975bac3be748a?hl=es I have some problems with onDrop on a Droppable Instead of he I have only a sortable list with draggable elements (I make the list sortable and every element draggable) I try two forms: onDrop: Borrar where Borrar is something like: Borrar = function () { my code here } an onDrop: function() {my code here } without lucky Th...
2006 Jan 25
8
RE: Make all LI items draggable
If you want the whole list draggable as one entity, you make one draggable. If you want each item draggable on their own, you need to make each one a new draggable. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of
2007 Dec 05
0
difficulty with onDrop in the ruby helper method
I need to return both the draggable element id and the dropped on element id to a ruby method. I''m using the helper method drop_receiving_element, and it''s all good and well until the onDrop part. I really want to pass both id''s to the ruby method that I''m calling. Really. However, it seems like onDrop only accepts a javascript function. :url => {:action =>foowhatever} only passes the draggable id. :with replaces the draggable id with whatever I want to give it...
2005 Aug 18
0
Possible bug with scriptaculous dragdrop.js
Hi all. I think the following code in dragdrop.js fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active); } should be changed to fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (thi...
2006 Jan 11
3
divider id of container
Hi there, i need to drag an draggable element to an child div node inside an another div container, but i create the child node dynamicly with ids like '' div_ + i '' where ''i'' is a incremental variable, thats the problem because i need get the id of this child nodes to manipulate it, somebody knows how if i drag the element to that child node i can get the id of
2008 May 29
4
Drag/Drop finding droppable's properties?
...nd drop them onto a "form" to build the design of our form. To achieve this, when I have dragged the object, and dropped it onto the "form" area, I want to get the position of where the object was dropped. I have a droppable area: Droppables.add(''dropArea'', {onDrop:addItem}); And a method that calls a webservice via AJAX: function addItem(element, dropon, event) { var s = element.id; // element.width,element.height,element.top,element.left, AJAXDDtest.DBAccess.InsertField(s,element.innerHTML,0,0,0,0, onGetDataComplete, onGetD...
2006 Feb 26
14
Question abour Draggables & Droppables
...quot;text/javascript"> new Draggable(item,{revert:true});</script> <!-- Droppable Div --> <div id="droparea" style="height:100px;width:100px;"><script type="text/javascript">//Droppable CartDroppables.add(''droparea'', {onDrop:function(element, dropon, event){ /* REVERT FALSE */ }});</script>[/CODE] Thank you in advance! _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it''s FREE! http://messenger.msn.click-url.com/go/onm002004...
2005 Aug 18
5
Sortable > how to know wich elementID was dropped ?
Maybe a newb question, maybe not. It''s not well documented, and I want to know how to know the id of my newly dropped item. The usage, would be to attach the newly dropped id to its *new* parent in a DB. Thanks. ???????????????????????? http://www.samueldr.com http://www.hostingquebec.ca
2006 Mar 29
3
droppables
I am not sure how many of you are using draggables/droppables but I thought I would do some experimentation and try and learn how to use them on my own. Well, I have draggables, and I have droppables. I do have one question for now. The droppable onDrop event seems to pass in 2 objects, the dropped object, and the container the object was dropped on. My question is this, can I figure out the container the dropped object came from? For example: 1 draggable (id: myDraggable) 2 divs (ids: myDropA, myDropB) which are both droppables accepting...
2006 Feb 24
3
New to Ajax
...'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 ht...
2005 Jul 28
3
chess
...us drag and drop stuff. A couple of questions, I am having trouble putting the chess pieces in the correct place - simply it seems that when i make somethign draggable it changes its positioning to relative - not so good for putting pieces on a board. Why is this ? Also i can''t see an OnDrop callback in the API documentation. Is this correct ? cheers jonah
2006 Jan 23
8
question about Sortables
...ged item is dropped? As it is, the onChange is called whenever you move the draggable to a new element (even if you don''t drop it), but I''d rather only call my function after they drop it to avoid unnecessary additional server calls. It looks like Droppable supports an ''onDrop'', but Sortable doesn''t have a facility to pass that along. Any ideas? Greg
2006 Jun 21
7
sortable tree problem
Hello, I''m having a problem when I set the tree option to true on Sortable. If I set the option to false my remote call works fine, but once I set it to true, I get some weird log errors from Webrick... undefined method `update'' for "11":String /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/cgi_methods.rb:214:in `build_deep_hash''
2005 Oct 25
2
Dragging to a textfield?
Hi All, I''m trying to drag a copy of a string from a list into a text field so that the original string stays in the list. I''m able to drag the item and set the value of the text field onDrop. But the original text leaves the list & with revert set to true it flies back to it''s original position in the list. We''re trying to avoid the flying text. What I''d like to do it drag a copy of the text and onDrop set the value of the text field and have the ele...
2007 Apr 13
2
Sortable - Droppable interaction
Hi there, I''m started to use scriptaculous yesterday and it''s really great. Hovever, there is one problem that I cannot solve: I have a page with a sortable list and a droppable "trash can". I would like to drag and drop items between the list and the trash can, but it don''t work. Which options should I set to make it works correctly? Thanks!
2006 Feb 28
0
Question abour Draggables & Droppables - my code example
...; Any other suggestions? > > > Date: Sun, 26 Feb 2006 19:39:24 -0500From: jvenema-Re5JQEeQqe/a73O7la2tQg@public.gmane.org: > rails-spinoffs-1W37MKcQCpIf0INCOvqR/jsJP3MJ7z13ZOWd9udUmOE@public.gmane.org: Re: [Rails-spinoffs] Question > abour Draggables & Droppables>From the wiki:OnDrop: Called whenever a > Draggable is released over the Droppable and the Droppable is accepts it. > The callback gets two parameters: the Draggable element, and the Droppable > elementNever actually tried this, but:onDrop: function(draggable,droppable){ > draggable.options.revert = false;...
2006 Jun 24
6
Few questions
I apologize if these questions are not relevant to Scriptaculous. I just want to get a general idea if I can acomplish some or all of these things with the framework, and then what (if any) I''ll need to do outside just using javascript. For now, I have 2 column layout. On the right I want a form palette where form elements can be dragged to the left column. I have a form inside the
2005 Oct 11
8
Drag & Drop probs
Hi, I''m just trying out the possibilities of script.aculo.us / prototype having two problems... I have a draggable element with revert:false-property and two dropzones. (The draggables are in a <td> and the dropzones are <div>s if that is important.) 1. I want the draggable element to snap back to its original position when it gets dropped anywhere out of a dropzone. 2.
2008 May 30
1
Drag and Drop with scriptaculous
...rop. What I try to do: I have some Draggables and some Droppables. You can drag each Draggables to each Droppables. When I drop a Draggables I want to center the Draggables inside the Droppable. And here I get my first problems:-( I use this code: Droppables.add( ''pos_2'' , { onDrop: function( element, target ) { target.highlight(); element.absolutize(); new Effect.Move( element, { x: target.offsetLeft, y: target.offsetTop, mode: ''absolute'' } ); } }); When I do this, it seams to work fine, but: After the "element.absolutize();" the el...
2008 May 02
2
making an element draggable after it's been dropped in a drop zone
...;ve added some css styles... document.observe(''dom:loaded'', function() { new Draggable(''draggable'', { revert: true}); Droppables.add(''dropp'', { accept: ''accept'', hoverclass: ''dropallowed'', onDrop : function(obj){ obj.setStyle(''width: 100px; height: 100px; background: blue;''); } any ideas? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs"...