RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Louis Walch
s-spinoffs- >> [EMAIL PROTECTED] On Behalf Of Louis Walch >> Sent: Monday, January 30, 2006 12:01 PM >> To: rails-spinoffs@lists.rubyonrails.org >> Subject: RE: [Rails-spinoffs] sortable list question >> >> oh right, value... god i always do that. >> >>

RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Gregory Hill
PROTECTED] On Behalf Of Louis Walch > Sent: Monday, January 30, 2006 12:01 PM > To: rails-spinoffs@lists.rubyonrails.org > Subject: RE: [Rails-spinoffs] sortable list question > > oh right, value... god i always do that. > > but, its not even alerting 'hi' so its

RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Louis Walch
oh right, value... god i always do that. but, its not even alerting 'hi' so its not getting to that point even. its making the list sortable, but nothing happens after i drag around. > Well, if they are hidden input fields, then I'm not sure you can use > innerHTML (all self-enclosed tags

RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Gregory Hill
Well, if they are hidden input fields, then I'm not sure you can use innerHTML (all self-enclosed tags should have no innerHTML). You need to set the value on them (ids[i].value = '' + i, instead of ids[i].innerHTML = i). Or by 'hidden fields', do you not mean ? Greg

RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Louis Walch
ids is an array of all elements with the class name of 'linkIndexNumber' which is only the hidden fields. i figured that getElementsByClassName would return them in the order they appear on the page, so i am using that to base which number they are in the list. then i am setting each of them to t

RE: [Rails-spinoffs] sortable list question

2006-01-30 Thread Gregory Hill
Assuming that $(ids[i]) is the hidden input field, wouldn't the following line need to reference it as a form element? > $(ids[i]).innerHTML = i; I would assume it should be (the "'' + " makes it a string, not sure if you can set a form element value to an in

[Rails-spinoffs] sortable list question

2006-01-30 Thread Louis Walch
here is most likely an easy question how come this will not work? i am trying to change the values of a hidden input inside each sortable to the current index. thanks! Sortable.create('list_filmLnks', { onUpdate: function() {