All,
I am trying to implement JavaScript that will remove a table row in frame [left],
and append it to a table in frame [right]. The browser is IE6.
I've played with several approaches for quite a bit of time, but none of them seem
to work. The removed row does not seem to be able to go across the frame boundaries.
Here is the code in the target frame [right] that is invoked by a button in
frame [left]:
function move_all()
{
var parentElement = window.parent.tleft.document.getElementById("tbody _left");
var parentElement1 = window.parent.tleft.document.getElementById("tbody _left1");
var referencedMode = document.getElementById("tbody_right");
{
removedEl = parentElement.removeChild(parentElement.childNodes[0]);
var newtr = removedEl.cloneNode(true);
parentElement1.appendChild(newtr);
/* referencedMode.appendChild(newtr); - DOES NOT WORK ... */
parentElement1.appendChild(removedEl);
}
}
My attempt to append the newtr object to frame [right] returns "Invalid argument".
Appending the same thing to another table in frame [left] works just fine,
as well as appending the original removed row {removedEl} to that table.
Does anyone have any suggestions? How can I move a copy of a complex object
from one frame to another?
Thanks,
Konstantin