Hello,

I'm new to mochikit, i'm trying to use it to create HTML fragments
with DOM api (i'm using mochikit from SVN).

The following code is working :

//----------------------------------------------------------------
var new_node = H1('hello');
var target = document.getElementById('title');
swapDOM(target, new_node);
//----------------------------------------------------------------

"hello" is correctly displayed.

But this code NOT :

//----------------------------------------------------------------
var new_node = DIV({'id':'title'}, H1('hello'));
var target = document.getElementById('title');
swapDOM(target, new_node);
//----------------------------------------------------------------

[object HTMLHeadingElement] is displayed in place of "hello".

Do you have any working example of DOM usage please ?

Thx.

--~--~---------~--~----~------------~-------~--~----~
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