I have an invisible IFRAME, and a visible DIV:
Code:
<div id="text" style="z-index:90;" class="chatWindowTextDisplay"
title="Chat Transcript - "
alt="Chat Transcript -"
><iframe name="textFrame" id="textFrame" src="http://localhost/iframeContent.php?cmd=file&file=chatTemplate&template=chatText&site=909076&sessionkey=H9030219168890559071K46359640" frameborder="0" border="0" width="350" height="220" class="chatWindowTextFrame"
title="Chat Transcript - "
alt="Chat Transcript - "
>This functionality requires frames. </a>.</iframe>
</div>
invisable iframe:
Code:
document.writeln('<div id="hiddentext" style="z-index:0;position:absolute;visibility:hidden;left:0;top:13px">'+
'<iframe name="lpCommFrame" id="lpCommFrame" src="http://localhost/iframecontent.php" frameborder="0" border="0" width="350" height="220" title="Background">'+
'This functionality requires frames. </iframe>'+
'</div>');
I need to copy the content from the lpCommFrame IFRAME, into the textFrame iframe which is inside DIV. Everything
comes from the same domain, so there are definitely not any cross-domain security issues.
I was able to get the content of hidden iframe and display it in alert using this code:
var win = window.frames['lpCommFrame'];
var newtext = win.document.body.innerHTML;
alert("textframe"+newtext);
But how to place that data in to my other frame which is called textFrame? i be happy if some one show me how to copy content of lpCommFrame frame to textFrame frame .Thanks