Hi The page where is the problem : http://capripot.ovh.org/demo_iframe/ So, at beginning, I create a sortable list with Sortable.create. Then, I add from the iframe, a li element in the list, so this element isn''t sortabled. I want to re-create the sortable list, so I try this from the iframe. But the referer of the "window" isn''t right. When You click on the "cool 5" item, it doesn''t move, but when you put your mouse on the iframe, you can see the item moving. I try to resolve this with the bind function, but there is less result than the first test. Have you got any idea to resolve this problem ? Thanks for your next answers. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The only consistent suggestion that''s come across the group is don''t use an iframe. Draggables can''t be dragged out of their frame (which makes sense when you think of them as children of a window), and the parent frame doesn''t catch mouse events in its children, and in many browsers, once a mouse has left the viewport, the frame doesn''t keep mouse focus. You could try to write a script to bridge the frame borders, but I doubt it would work well. TAG On Apr 22, 2007, at 3:01 PM, Capripot wrote:> > Hi > The page where is the problem : http://capripot.ovh.org/demo_iframe/ > > So, at beginning, I create a sortable list with Sortable.create. > Then, I add from the iframe, a li element in the list, so this element > isn''t sortabled. > I want to re-create the sortable list, so I try this from the iframe. > But the referer of the "window" isn''t right. > When You click on the "cool 5" item, it doesn''t move, but when you put > your mouse on the iframe, you can see the item moving. > I try to resolve this with the bind function, but there is less result > than the first test. > Have you got any idea to resolve this problem ? > Thanks for your next answers. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK, I hate iframe too, but to make an AJAX styling upload system, it''s the only way Ok for the mouse, but, can I call a function in my parent page, to give the right place to the mouse ? I don''t want the sortable run in the frame, I just want to make a Sortable on parent page from an iframe. So, can I do this ? or it''s impossible ? Howover, I could detect the add of the line with the parent page too, and re-create the Sortable at this moment ?! Capripot On Apr 23, 5:21 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> The only consistent suggestion that''s come across the group is don''t > use an iframe. > > Draggables can''t be dragged out of their frame (which makes sense > when you think of them as children of a window), and the parent frame > doesn''t catch mouse events in its children, and in many browsers, > once a mouse has left the viewport, the frame doesn''t keep mouse focus. > > You could try to write a script to bridge the frame borders, but I > doubt it would work well. > > TAG > > On Apr 22, 2007, at 3:01 PM, Capripot wrote: > > > > > Hi > > The page where is the problem :http://capripot.ovh.org/demo_iframe/ > > > So, at beginning, I create a sortable list with Sortable.create. > > Then, I add from the iframe, a li element in the list, so this element > > isn''t sortabled. > > I want to re-create the sortable list, so I try this from the iframe. > > But the referer of the "window" isn''t right. > > When You click on the "cool 5" item, it doesn''t move, but when you put > > your mouse on the iframe, you can see the item moving. > > I try to resolve this with the bind function, but there is less result > > than the first test. > > Have you got any idea to resolve this problem ? > > Thanks for your next answers.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I see what you''re asking. The question is not specific to Scriptaculous/Prototype at all, but rather a generic Javascript question. In your parent frame, write the function to create/append the Sortable. function doSomething() { // Whatever } You can call the function from your child frame easily: parent.doSomething(); TAG On Apr 23, 2007, at 9:47 AM, Capripot wrote:> I don''t want the sortable run in the frame, I just want to make a > Sortable on parent page from an iframe. > So, can I do this ? or it''s impossible ? > > Howover, I could detect the add of the line with the parent page too, > and re-create the Sortable at this moment ?!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Oh !!!! It was so easy ! Sorry for the trouble. On Apr 23, 6:20 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> I see what you''re asking. The question is not specific to > Scriptaculous/Prototype at all, but rather a generic Javascript > question. > > In your parent frame, write the function to create/append the Sortable. > > function doSomething() { > // Whatever > > } > > You can call the function from your child frame easily: > parent.doSomething(); > > TAG > > On Apr 23, 2007, at 9:47 AM, Capripot wrote: > > > I don''t want the sortable run in the frame, I just want to make a > > Sortable on parent page from an iframe. > > So, can I do this ? or it''s impossible ? > > > Howover, I could detect the add of the line with the parent page too, > > and re-create the Sortable at this moment ?!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---