Hi batman, this shell shows how you could do it. http://mootools.net/shell/fabiomcosta/Rpmjb/
I see a lot of people needing this kind of functionality, maybe they will reach this too. If you find any bug please tell me. -- Fábio Miranda Costa Solucione Sistemas Engenheiro de interfaces On Mon, Apr 12, 2010 at 1:59 PM, batman42ca <[email protected]> wrote: > I have a text form field that I want to convert into a select element. > I want to preserve any and all "data" properties that I set on the > text field when I replace it with a select field without knowing in > advance what those property names are. > > Here's a made up example to demonstrate. I want start with this: > > <input type="text" name="number" value="one" data-a="alpha" data- > b="beta"> > > and end up with this > > <select name="number" data-a="alpha" data-b="beta"> > <option selected>one</option> > <option>two</option> > <option>three</option> > </select> > > I can copy the form field name, and clone any events but without > knowing the property names, is there a way I can clone the properties? > > > -- > To unsubscribe, reply using "remove me" as the subject. >
