cloneNode is part of core Javascript, not Mochikit; I imagine this is
the reason why it's not in the documentation ...

Jeremy

On Oct 1, 4:01 pm, tphyahoo <[EMAIL PROTECTED]> wrote:
> I wanted to embed a table in a form, and it took me a long time to
> figure out how to do it.
>
> If cloneNode had been listed as a mochikit function at
>
> http://mochikit.com/doc/html/MochiKit/index.html
>
> I could have gotten the job done a lot faster.
>
> test1 = function() {
>     insertTable1();
>     embedPrettyTables();
>
> }
>
> embedPrettyTables = function() {
>     forEach ( ( findChildElements( currentDocument(),
> ["table.prettytable", "form.prettyform"]) ), function(el) {
>         //appendChildNodes( currentDocument().body, FORM( {},
> el.cloneNode( true ) ) );
>         //removeElement(el)
>         swapDOM(el, FORM({}, el.cloneNode(true)) );
>     } )
>
> }
>
> Could this be added to the main documentation to prevent others from
> having this issue?
>
> Or is the use of cloneNode discouraged? In which case how should I
> have accomplished the above?
>
> I wasted a lot of time trying to use the clone(obj) method, whose
> purpose I still haven't really figured out.
>
> t.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to