D
Don Li
I've 'minicked' a small function with the dragDrop method, it's
working. What I'd like to go a step further would be doing copy the
object to another location on the same page instead of moving it.
A piece of advice is to clone the original one before applying the
dragDrop, then question, what's wrong with the following?
// create a new element
var newElement = document.createElement('copy1');
// set its value;
// background info: the page has an ID of "test1", source elment
copy1 = test1.cloneNode(true);
// where to insert it;
test1.appendChild(newElement);
Also, even if the above code works, it's not good enough because the
cloned element needs to overlay the top of the original source, how?
Thanks.
working. What I'd like to go a step further would be doing copy the
object to another location on the same page instead of moving it.
A piece of advice is to clone the original one before applying the
dragDrop, then question, what's wrong with the following?
// create a new element
var newElement = document.createElement('copy1');
// set its value;
// background info: the page has an ID of "test1", source elment
copy1 = test1.cloneNode(true);
// where to insert it;
test1.appendChild(newElement);
Also, even if the above code works, it's not good enough because the
cloned element needs to overlay the top of the original source, how?
Thanks.