I would like to load an IFRame with known html content from a query in the main page.
Something like this. I want to set the IFrame content without needing a separate src URL. I already have the content I need to display in the frame.
Something like this. I want to set the IFrame content without needing a separate src URL. I already have the content I need to display in the frame.
Code:
<td>
<IFRAME ID="NarrFrame" HEIGHT="100" WIDTH="700"
FRAMEBORDER="1" SCROLLING="YES">
</IFRAME>
</td>
<script type="text/javascript">
<!--
myHTML = 'some HTML code';
frame = document.getElementById("NarrFrame");
frame.document.open();
frame.document.write(myHTML);
frame.document.close();
//-->
</script>