[Proto-Scripty] Re: Possible bug in Sortable.create?

2008-09-17 Thread Condor

Hi Diodeus,

Thanks for your reply.  You're absolutely right, I had missed  
including the wrapping table elements in the snippet.  I was able to  
find the problem however and it had to do with an error in the table  
elements themselves and had nothing to do with Sortable functionality.

Sorry for the noise, but thank you very much for the help.

- Jim

On Sep 16, 2008, at 7:11 AM, Diodeus wrote:

>
> 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
>>
>> > action="...">
>>
>>
>>  
>>
>>  Name
>>   
>>  Tag
>>   
>>
>>
>>
>>  > type=text name="name0">
>>   
>>  > type=text name="tag0">
>>  -
>>   
>>
>>
>>
>>  > type=text name="name1">
>>   
>>  > type=text name="tag1">
>>  - +
>>   
>>
>>
>>
>>> onclick="iterator1(this.form)">
>>  
>>  
>>
>>  
>>  //>  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 += '
'; >>} >>list += '[' + el.name + '], ' + el.value; >> } >>} >>$('info').innerHTML = order + '

' + list; >> } >> Sortable.create("list", {hoverclass:'rowHover', >> onUpdate:function(request){writeOrder();}}); >> //]]> >> >> >> > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---

[Proto-Scripty] Re: Possible bug in Sortable.create?

2008-09-16 Thread Diodeus

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
>
>  action="...">
>
> 
>   
> 
>   Name
>    
>   Tag
>    
> 
> 
> 
>type=text name="name0">
>    
>type=text name="tag0">
>   -
>    
> 
>
> 
>type=text name="name1">
>    
>type=text name="tag1">
>   - +
>    
> 
>
> 
>  onclick="iterator1(this.form)">
>   
>   
>
>   
>   //   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 += '
'; > } > list += '[' + el.name + '], ' + el.value; > } > } > $('info').innerHTML = order + '

' + list; > } > Sortable.create("list", {hoverclass:'rowHover', > onUpdate:function(request){writeOrder();}}); > //]]> > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---