Hey Mike, Mike a écrit : > I would like to be able to create a draggable element in > script.aculo.us that I can then drag a copy of (ghost) into a text box > (input type=text) ... upon releasing the ghosted element within the > text box, the text box will then be filled with the text from the > draggable element.
You'll need to create your Draggable (new Draggable(...)) with the ghost option, then to make the textbox droppable (Droppables.add(...)), and provide the proper onDrop handlers to get the draggable element being dropped and fetch its content text, then assign it to your textbox's "value" property. As for grabbing the text, it very much depends on what's inside your draggable element. I'm no big fan of innerHTML, but I suspect e.innerHTML.stripTags() would do OK. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
