p.phresh
06-27-2007, 03:27 PM
I've coded a pop up window that's supposed to take the information from one page and clone it into the new pop up window.
The information to be cloned is a table and does not come from the pop up parent, but is open in a frame in a sibling.
Can cloneNode transport information from one window to another in IE? It works perfectly in FF.
here's the bit of code i'm using:
var generator = window.open('','printPop','height=600,width=700,top=0,scrollbars=yes,status=yes');
var f_head = parent.head.document;
var f_ipl = parent.ipl.document;
var head_table = f_head.getElementById('header');
var head_clone = head_table.cloneNode(true);
var newDiv = generator.document.createElement("div");
newDiv.setAttribute("id", "newDiv");
var divTags = generator.document.getElementsByTagName("div");
var thisDiv = divTags[0];
thisDiv.appendChild(newDiv);
newDiv.appendChild(head_clone);
Is this the right way to do it for IE? Is there another method so it can work in IE?
I've tried the innerHTML method, it copies the text only and leaves all the Table tags behind, and i would rather not use it if i can choose.
thanks for any help anyone can provide.
The information to be cloned is a table and does not come from the pop up parent, but is open in a frame in a sibling.
Can cloneNode transport information from one window to another in IE? It works perfectly in FF.
here's the bit of code i'm using:
var generator = window.open('','printPop','height=600,width=700,top=0,scrollbars=yes,status=yes');
var f_head = parent.head.document;
var f_ipl = parent.ipl.document;
var head_table = f_head.getElementById('header');
var head_clone = head_table.cloneNode(true);
var newDiv = generator.document.createElement("div");
newDiv.setAttribute("id", "newDiv");
var divTags = generator.document.getElementsByTagName("div");
var thisDiv = divTags[0];
thisDiv.appendChild(newDiv);
newDiv.appendChild(head_clone);
Is this the right way to do it for IE? Is there another method so it can work in IE?
I've tried the innerHTML method, it copies the text only and leaves all the Table tags behind, and i would rather not use it if i can choose.
thanks for any help anyone can provide.