1. use Sortable.serialize (be sure to include a "_" in your element
ids) on the containers to get a delimited order sequence string or cycle
through the elements in order yourself and create a delimited sequence
string. Then pass the delimited sequence string in a posted form field
or via get and reconstitute as required on the server. Depending on
your neeeds, you can put the code to create the delimiter sequence
string in the Sortable container onUpdate event or in a pre-submit function.
2. set the containment options in Sortable.create. If container 1
should be droppable into containers 1 and 3, then your options when you
Sortable.create container 1 should include "containment:[
''container_1'',
''container_3'']", etc.
Good luck.
- Doug Forrest
Grzegorz V. Furmanek wrote:
> Hi,
>
> I ma new to the scriptaculus and I do like the concept.
> The effects are quite useful; however some of the drag and
> drop functionality seems still quite immature.
>
> Since I am new to the JavaScript altogether I have
> more questions then knowledge here some of them:
>
> 1. In a situation where I am interested in submitting
> the order of sorted container, what is the best way to
> keep track of the elements? Does anyone have any
> code which would do this sort of functionality reliably?
>
> 2. In a situation where there are more then two containers
> lets say 3:
> containers 1 and 2 are source containers
> container 3 is the destination
> items from container 1 should be droppable into 1 and 3
> items from container 2 should be dorppable into 2 and 3
> I could not find a reliable way of keeping the containers
> from following sequence 1, 3, 2 so the items from 1
> could be placed in 2 through the third container. Is there
> a nice way of preventing such behavior?
>
> Sincerely
>
> Greg
>
>_______________________________________________
>Rails-spinoffs mailing list
>Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>