PDA

View Full Version : dynamically created DHTML/Layers?



ianpri
February 2nd, 2001, 07:30
Hi all, not sure this is the right place to post, if it isn't, please move!

Just a query on using the DOM to dynamically create objects. I know its possible throught the use of the clone function:

var squareNode = document.createElement("IMG");
tempSquareNode = squareNode.cloneNode();
divNode.appendChild(tempSquareNode);

but has anyone got an idea on how to clone layers with set content? I just want to clone/dynamically create a layer with the same contents each time i press a button. Any ideas, or an example/point in the right direction would be greatly appreciated.

Cheers

Barney