On 10/29/06, Stefan Petre <[EMAIL PROTECTED]> wrote:
Maybe:
item[]=1&item[][]=21&item[][]=34&item[]=4&item[]=7
I wonder if that would work on the server-side.
Hi guys,
Since soon I will implement the new sortables for trees I need your
opinion on how to implement serialization. I want to implement more then
one version.
So consider the next HTML
<ul id="root">
<li id="item_1">
<ul>
<li id="item_21"></li>
<li id="item_34"></li>
</ul>
</li>
<li id="item_4"></li>
<li id="item_7"></li>
</ul>
Maybe:
item[]=1&item[][]=21&item[][]=34&item[]=4&item[]=7
I wonder if that would work on the server-side.
When you make your suggestion please use this as reference. You can
change the IDs if your situation requires it.
*Method 1
*I'm using nested sets to store hierarchical data in database so this
fits me:
item[1][]=1 - parent id
item[1][]=1 - level
item[1][]=1 - left id
item[1][]=6 - right id
item[21][]=1 - parent id
item[21][]=2 - level
item[21][]=2 - left id
item[21][]=3 - right id
item[34][]=1 - parent id
item[34][]=2 - level
item[34][]=4 - left id
item[34][]=5 - right id
item[4][]=4 - parent id
item[4][]=1 - level
item[4][]=7 - left id
item[4][]=8 - right id
item[7][]=7 - parent id
item[7][]=1 - level
item[7][]=9 - left id
item[7][]=10 - right id
I will use 4 days then release the plugin based on your feedback. Sure
later I can add more versions for serialization, but will be nice to
have them at the first release.
Stefan
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
