I have an unordered list, each list item has an id (id=”6~OriginalName”) – when I do a toArray on this list, I get a nice array and each item looks like “6~OriginalName” that I can parse later on.
$("#roleList").sortable('toArray')
The problem is that now I’ve embedded a TextBox in each list, which its value that of the OriginalName, the user can now edit the name. But “toArray” only creates the array based on the id.
How can I create a nice array of “6~UserEditedName” from the textbox?
If I have to do it manually I will – toArray like before, somehow create an array based on ALL the textbox values and combine the 2. But I have no idea how to access each textbox.
Oh – the user can also add new items in the list (therefore embedded textbox) because I have an append() going on as well 😛
I hope this makes sense.
Picture a list with a bunch of texboxes where you can “edit” the list.
This solution will be inexact, since you didn’t post your full code. What you can to do is find all of the textboxes using the appropriate jQuery selector, then run a function against the selection to build your array. Ex: