I have an html table from one window. I get the table by using
var table = document.getElementById(\'tableId\');
then I open another windo
Problem with above solution is that innerHTML and outerHTML is not supported in IE versions
IE is probably can't move elements across different documents. What you can do is to user the outerHTML property if the browser fails to clone the table.
e.g.
var tbl = window.opener.table;
try {
document.getElementById('my_div').appendChild(tbl.cloneNode(true));
}
catch (e){
if (tbl.outerHTML) {
document.getElementById('my_div').innerHTML = tbl.outerHTML;
}
else {
console.log('not working');
}
}