It seemed to work for me. Perhaps I don't understand what you mean.

On Sep 15, 9:50 pm, Yoji <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm new to the list so I apologize if this has been brought up and/or
> solved before... I'm having trouble using the scriptaclous sortable
> feature on form input elements.
>
> I'm trying to create a sortable list of input text elements to be
> entered by the user, however once a row is moved the input elements of
> that row are removed from the Form parentNode.
>
> I've included a code snippet of what I currently have below, but if
> you'd like a full implementation to play with I can provide that as
> well.
>
> Any guidance would be greatly appreciated.
>
> Thanks,
> Jim
>
> <form name="mainForm" enctype="multipart/form-data" method="post"
> action="...">
>
>                                 <div style="text-align:center">
>                   <div class="grid">
>                     <div class="head">
>                       <div class="cc_col1">Name</div>
>                       <div class="cc_col2">&nbsp;</div>
>                       <div class="cc_col3">Tag</div>
>                       <div class="cc_col4">&nbsp;</div>
>                     </div>
>                     <ul id="list">
>                         <li id="names_0">
>                           <div class="cc_col1"><input id="name"
> type=text name="name0"></div>
>                           <div class="cc_col2">&nbsp;</div>
>                           <div class="cc_col3"><input id="tag"
> type=text name="tag0"></div>
>                           <div class="cc_col4">-</div>
>                           <div class="clear">&nbsp;</div>
>                         </li>
>
>                         <li id="names_1">
>                           <div class="cc_col1"><input id="name"
> type=text name="name1"></div>
>                           <div class="cc_col2">&nbsp;</div>
>                           <div class="cc_col3"><input id="tag"
> type=text name="tag1"></div>
>                           <div class="cc_col4">-&nbsp;+</div>
>                           <div class="clear">&nbsp;</div>
>                         </li>
>
>                     </ul>
>                     <input type="button" value="checkMe"
> onclick="iterator1(this.form)">
>                   </div>
>                   <p id="info"></p>
>
>                   <script type="text/javascript">
>                   //<![CDATA[
>                   function iterator1(oForm) {
>                     // array table dump
>                     var x =
> open('','','width=600,left=200,top=50,scrollbars,status=0');
>                     x.document.open('text/plain');
>                     var e = oForm.elements;
>                     for (var i in e) x.document.write(i + ': ' + e[i]
> + ' [' + e[i].name + '] - ' + e[i].value + ' *** \n');
>                     x.document.close();
>                   }
>                   function writeOrder() {
>                     // onscreen debug
>                     var order = Sortable.sequence('list');
>                     var el, list = '', i = 0;
>                     while (el = document.mainForm.elements[i++]) {
>                       if (el.nodeName == 'INPUT' && el.type == 'text')
> {
>                         if (i > 0) {
>                           list += '<br>';
>                         }
>                         list += '[' + el.name + '], ' + el.value;
>                       }
>                     }
>                     $('info').innerHTML = order + '<br><br>' + list;
>                   }
>                   Sortable.create("list", {hoverclass:'rowHover',
> onUpdate:function(request){writeOrder();}});
>                   //]]>
>                   </script>
>
> </form>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to