Sure. You have to use a className for the handles, since you
presumably have more than one of them. You cannot have the same ID
more than once in any given page. If you do, you get either
unpredictable results or nothing, depending on how pedantic the
browser or code is feeling that particular day. Also, the parameter is
named handle, not handles.
Try this:
Item Name - Date - Detail -
REORDER
Sortable.create("list_to_sort", {
element:'li', /*this is the default, but I'm adding it to show you
how this should be written*/
handle:'thehandle',
onUpdate: function() {
new Ajax.Request("updateRowOrder.cfm", {
method: "post",
parameters: {
data: Sortable.serialize("list_to_sort")
}
});
}
});
Walter
On Jun 17, 2009, at 11:05 AM, Maya wrote:
>
> I've assigned a handle on my sortable and it works fine in Firefox but
> not at all in IE. In IE you can use any of the elements in the LI to
> reorder the list. I would like to only be able to use the "REORDER"
> element to reorder the list. Any suggestions?
>
>
>
> Item Name - Date - Detail - id="thehandle">REORDER
>
>
>
>
> Sortable.create("list_to_sort", {
> elements:$$('#list_to_sort li.sortlist'),
> handles:$$('#list_to_sort #thehandle'),
> onUpdate: function() {
> new Ajax.Request("updateRowOrder.cfm", {
> method: "post",
> parameters: { data: Sortable.serialize("list_to_sort") }
> });
> }
> });
>
> >
--~--~-~--~~~---~--~~
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
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---