<div>Hello Julian,<br></div><div><br></div><div>Many thanks for your help.</div><div><br></div><div>I have not had a chance to try it yet, but am optimistic that I will now be able to get my wizard to work.</div><div><br></div>
<div>Kind regards</div><div><br></div><div>Johnathan</div><br><div class="gmail_quote">On 9 June 2010 21:34, Julian Tenney <span dir="ltr"><<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div dir="ltr"><div class="im">
<div dir="ltr"><font face="Arial" color="#808080" size="2">Whilst I know how to remove nodes and duplicate an existing node - that is to the extent you can see in my quiz example, I have no idea how you would programmatically go about taking a copy of a node from one location and duplicating it to another location.</font></div>
<div dir="ltr"> </div>
</div><div dir="ltr"><font face="Courier New" size="2">//get a copy - use your own paths to the icon</font></div>
<div dir="ltr"><font face="Courier New" size="2">myProto = icon.parentNode.getChildByName("protoNode").cloneNode(true);</font></div>
<div dir="ltr"> </div>
<div dir="ltr"><font face="Courier New" size="2">//you have the node - now put it somewhere</font></div>
<div dir="ltr"><font face="Courier New" size="2">icon.nextSibling.appendChild(myProto);</font></div>
<div dir="ltr"> </div>
<div dir="ltr"><font face="Courier New" size="2">//then dupe away</font></div>
<div dir="ltr"><font face="Courier New" size="2">icon.nextSibling.childNodes[0].duplicate(n);</font></div>
<div dir="ltr"> </div>
<div dir="ltr"><font face="Arial" size="2">Obviously work it to fit your structure. PageTemplates used to work like that, before the models existed as seperate files.</font></div></div></div>
<br>_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br></blockquote></div><br>