jovialjonny
06-17-2003, 04:24 PM
hi,
I have got an iframe that is being targeted by a form. So the form submits to a servlet and the resulting page loads in this iframe.
What I want to do is create another iframe containing exactly the same thing (So the data in the form can be analysed by users in a split screen). I have had no problem duplicating the iframe for regular web pages like so:
var ifrm = document.createElement("IFRAME");
ifrm.id = "f"+reverseId;
ifrm.scrolling = "Auto";
//THE FRAME I AM COPYING
var origIfrm = document.getElementById("f"+tabId);
//SET THE SRC TO BE THE SAME
ifrm.src = origIfrm.src;
document.body.appendChild(ifrm);
If the iframe contained, say google, this works fine but when I try it with the data returned from the form I just get a blank page.
The iframe containing the form seems to have no 'src' or 'location' or 'innerHTML' that I can reference. Does anyone know how can I get the content of the iframe and put it into this new iframe I have created?
I have got an iframe that is being targeted by a form. So the form submits to a servlet and the resulting page loads in this iframe.
What I want to do is create another iframe containing exactly the same thing (So the data in the form can be analysed by users in a split screen). I have had no problem duplicating the iframe for regular web pages like so:
var ifrm = document.createElement("IFRAME");
ifrm.id = "f"+reverseId;
ifrm.scrolling = "Auto";
//THE FRAME I AM COPYING
var origIfrm = document.getElementById("f"+tabId);
//SET THE SRC TO BE THE SAME
ifrm.src = origIfrm.src;
document.body.appendChild(ifrm);
If the iframe contained, say google, this works fine but when I try it with the data returned from the form I just get a blank page.
The iframe containing the form seems to have no 'src' or 'location' or 'innerHTML' that I can reference. Does anyone know how can I get the content of the iframe and put it into this new iframe I have created?