There's nothing built in that does this directly (i.e., no parameter
you can set which makes it work) but I have built things like this
using the P/S drag and drop system. The way I usually make it happen
is integrated with the server, so not entirely within the browser. You
could make it all happen in the browser, but my applications so far
have required that the cloned objects actually proxy for a "real"
object in my system.
Can you say a little more about your two lists? What do you want list2
to look like after a successful drop? You say you want list2: { xx,
bb, yy, zz }, but as long as bb is still in list1, that's illegal,
because you can't have two things on the page with the same ID. You
could have list2: { xx, bb_1, yy, zz } for example...
Walter
On Jun 11, 2010, at 5:45 PM, Mark wrote:
Hi,
I'm trying to evaluate javascript libraries that allow you to do drag
and drop, looking at scriptaculous now.
I have two lists, like this:
list1
aa
bb
cc
list2
xx
yy
zz
is it possible in scriptaculous to drag an item from list1, say 'bb',
and drop it in list2, but instead of removing it from list1, a clone
is made and inserted in list2? That way the result is:
list1: { aa, bb, cc } list2: { xx, bb, yy, zz }
Other than that I just need the general dnd stuff, like I need to be
able to reorder the elements in both lists by dragging.
I tried using jquery-ui, but it doesn't allow this cloning behavior.
It only allows you to move items between lists.
Thanks
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.