Jon Garvin
2007-Sep-19 18:15 UTC
reoder list on RJS response (Script.aculo.us or Prototype method?)
I''ve got a list of items that I''d like to reorder as part of an RJS response to an Ajax call to the server. Normally I would just place the entire list in a div and redraw the list from a partial, but in this case that''s not a viable option. It seems to me that this sort of thing *should* be possible, since the Script.aculo.us drag&drop is able to re-order lists. However, I''m having trouble finding the low level Protoype or Script.aculo.us methods that I can call to do this. I''ve dug through the source of each as well as the respective API docs, but come up empty handed so far. It would make me vary happy if all I had to place in my RJS code was something simple like page.update_position(''third_list_item'',1) or page[''third_list_item''].move_to_top, but I''m realizing now that that''s probably not possible. If someone with a low level understanding of how either of these libraries work that can point me in the right direction, it would be much appreciated. -- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---