yes, sortable/storable -- its a typing-dyslexic thing.
i had gone through the code. its just a bit confusing how its
implemented. i was hoping someone had done this in the past.
i couldn't figure out how to get the tag:'div' more abstacted, and from
the sortable item
but i came up with this shortly after i posted.
personally, i think it would be nice if there were a better version of
this available as a method ( submit element / delimiter, it strings it
together ). the current serialize is perfect for get , but doesn't
work well with post.
=============
MochiKit.Sortable.Sortable.create(
'fmoList', {
tag:'div',
onChange:function() {
document.getElementById('fmo_order').value=
serialize_string('fmoList') ;
}
}
);
function serialize_string ( elementId )
{
var element =
MochiKit.DOM.getElement(elementId);
var self = MochiKit.Sortable.Sortable;
var options =
MochiKit.Base.update(self.options(element),
{tag:'div'});
var name =
encodeURIComponent(options.name || element.id);
return MochiKit.Base.map(
function (item)
{
return
encodeURIComponent(item);
},
self.sequence(element, options)
).join(':');
}
document.getElementById('fmo_order').value=
serialize_string('fmoList') ;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit
-~----------~----~----~----~------~----~------~--~---