I did that this way also once. Why not simply extend the ID with another underscore + number for each level?

list_1
list_1_0
list_1_1
list_1_1_0

etc..
easy to traverse with simple for loops and using listid.split("_").

However.. as Jerod wrote: there is a sortable tree since the latest release. Try that.

Kjell

On 6/16/06, Pedro Valentini <[EMAIL PROTECTED]> wrote:

I'm trying to use id="list[2]" because I want to insert multiple
sortable lists in an tree and get all in an array in ruby.
But ok, the list_2 fixed the problem and I will get other way to receive
the multiple lists.

The new version of sortable list have the option tree or not? I'm see
somethink like it in:

http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/test/functional/index.html
But the option tree isn't in this documentation:
  http://wiki.script.aculo.us/scriptaculous/show/Sortable.create
Why?

Thank you Kjell,
Pedro


Kjell Bublitz escreveu:
> Probably because you use bad-html. The way you define your div id is
> not valid and thus will lead to browser problems.
>
> ID and NAME must begin with a letter ([A-Za-z]) and may be followed by
> any number of letters, digits ([0-9]), hyphens ("-"), underscores
> ("_"), colons (":"), and periods (".").
>
> try it with this notation instead:
> <div id="list_4">
>
> Also as far as i know script.aculo.us <http://script.aculo.us> needs a
> special format if not stated otherwise using the "format" option.
>
> Change the ID and everything should be fine.
>
> best regards,
> kjell
>
> On 6/16/06, *Pedro Valentini* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi,
>
>     I'm tyed to active revert but nothing change, but I think that the
>     problem don't is in the code because it work perfectly in
>     Firefox1.5 and
>     get errors in IE6 and look like an bug.
>     The script is like:
>
>     <div id="list[4]">
>             <div id="item_17">Construções sobre a pintura</div>
>             <div id="item_8">Daniel Senise: Surface Dialogue</div>
>             <div id="item_9">Daniel Senise: Vestígios</div>
>             <div id="item_1319">XX Bienal de São Paulo, 1989</div>
>             <div id="item_10">Paulo Herkenhoff</div>
>             <div id="item_1314">O Chão Andaluz</div>
>     </div>
>
>     <script type="text/_javascript_">
>     //<![CDATA[
>     Sortable.create("list[4]", {onUpdate:function(){new
>     Ajax.Updater('notice', '/admin/order', {asynchronous:true,
>     evalScripts:true, onComplete:function(request){new
>     Effect.Highlight("list[4]",{});},
>     parameters:Sortable.serialize("list[4]")})}, tag:'div'})
>     //]]>
>     </script>
>
>     Thank you,
>     Pedro
>
>
>
>     Kjell Bublitz escreveu:
>     > Hi Pedro.
>     >
>     > Did you set the "revert" option to "true"?
>     > Sounds like revert is not active.
>     >
>     > -- Kjell
>     >
>     > On 6/16/06, *Pedro Valentini * < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>     > <mailto:[EMAIL PROTECTED]
>     <mailto: [EMAIL PROTECTED]>>> wrote:
>     >
>     >     Please,
>     >
>     >     I'm build an drag and drop tree using scriptaculous and it is
>     >     perfect in
>     >     FF but when I test in IE don't work, I drag the element and
>     when I
>     >     free
>     >     the button the element don't go to the place, stay in the mouse
>     >     pointer...
>     >
>     >     What can do it happen? I'm using last version of scriptaculous.
>     >
>     >     Thank you,
>     >     Pedro
>     >
>     >     _______________________________________________
>     >     Rails-spinoffs mailing list
>     >     Rails-spinoffs@lists.rubyonrails.org
>     <mailto:Rails-spinoffs@lists.rubyonrails.org>
>     >     <mailto:Rails-spinoffs@lists.rubyonrails.org
>     <mailto:Rails-spinoffs@lists.rubyonrails.org>>
>     >     http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>     >
>     >
>
>     _______________________________________________
>     Rails-spinoffs mailing list
>     Rails-spinoffs@lists.rubyonrails.org
>     <mailto:Rails-spinoffs@lists.rubyonrails.org>
>     http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>     <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

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

Reply via email to