Hi, I have two select lists, one on left side and one on right side. Between them I have an right and left arrow. When I select something on the left side and click on the right arrow the elements will go to the right side, and disappear from the left side. I have for the moment written my own code that is taking care of moving the elements from one list to another. But I''d like to know if there is some nice Prototype method to move elements between different "containers". I do know about the "drag and drop", but that is not what I want. I could probably did inside of the "drag and drop" code to figgure out how Prototype is doing the "background" moving of the elements. Best regards, Peter Lauri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
If you''re just moving elements around, the standard DOM methods appendChild and insertBefore will likely be more than sufficient for your needs. There are several good references out there for these function. This one came up in Google--I''ve seen better, but it is sufficient. http://www.htmlgoodies.com/primers/jsp/article.php/3594621 TAG On Apr 25, 2007, at 12:07 AM, Peter Lauri wrote:> Hi, > > I have two select lists, one on left side and one on right side. > Between them I have an right and left arrow. When I select > something on the left side and click on the right arrow the > elements will go to the right side, and disappear from the left side. > > I have for the moment written my own code that is taking care of > moving the elements from one list to another. But I''d like to know > if there is some nice Prototype method to move elements between > different "containers". I do know about the "drag and drop", but > that is not what I want. I could probably did inside of the "drag > and drop" code to figgure out how Prototype is doing the > "background" moving of the elements. > > Best regards, > Peter Lauri--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Ok, that is what I am using now :) So obviously it was sufficient :) /Peter> -----Original Message----- > From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails- > spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Tom Gregory > Sent: Wednesday, April 25, 2007 7:51 PM > To: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Subject: [Rails-spinoffs] Re: Moving elements > > > If you''re just moving elements around, the standard DOM methods > appendChild and insertBefore will likely be more than sufficient for > your needs. > > There are several good references out there for these function. This > one came up in Google--I''ve seen better, but it is sufficient. > http://www.htmlgoodies.com/primers/jsp/article.php/3594621 > > > TAG > > On Apr 25, 2007, at 12:07 AM, Peter Lauri wrote: > > > Hi, > > > > I have two select lists, one on left side and one on right side. > > Between them I have an right and left arrow. When I select > > something on the left side and click on the right arrow the > > elements will go to the right side, and disappear from the left side. > > > > I have for the moment written my own code that is taking care of > > moving the elements from one list to another. But I''d like to know > > if there is some nice Prototype method to move elements between > > different "containers". I do know about the "drag and drop", but > > that is not what I want. I could probably did inside of the "drag > > and drop" code to figgure out how Prototype is doing the > > "background" moving of the elements. > > > > Best regards, > > Peter Lauri > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---