[Dojo-interest] How to add a dom node into html pag by Dojo?

Dongsu Jang dsjang at thinkfree.com
Wed Aug 20 08:21:05 UTC 2008

use dojo.place()
It's a dojo-way ;)

for example:
<script type="text/javascript" djConfig="isDebug:true" 
<script type="text/javascript">
var newNode = dojo.doc.createElement('div');
newNode.innerHTML = 'new node';
dojo.place(newNode, 'wrapper', 0);
dojo.place('oldNode', 'wrapper', 'last');
<div id="oldNode">old node</div>
<div id="wrapper"><!-- newNode will be placed here --></div>

see also http://api.dojotoolkit.org/jsdoc/dojo/HEAD/dojo.place

hawk gao 쓴 글:
> Hi, all,
> I'm new in Dojo. I only found dojo.byId() to get node, but didn't find 
> any way to add node.
> Thanks
> Hawk
> ------------------------------------------------------------------------
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dsjang.vcf
Type: text/x-vcard
Size: 368 bytes
Desc: not available
Url : http://turtle.dojotoolkit.org/pipermail/dojo-interest/attachments/20080820/453f9b1d/attachment.vcf 

More information about the Dojo-interest mailing list