Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1268 Is there any way to make a document read another document and put it in a layer?

You are here: irt.org | FAQ | DHTML | Q1268 [ previous next ]

The following works using .htm files in Internet Explorer 4+ and Netscape Navigator 4+ (if you attempt to use a .txt file in Netscape Navigator 4+ it'll fail):

<html>
<head>
<script language="JavaScript"><!--
function extract() {
    if (document.all)
        document.all['file'].innerHTML = document.frames[0].document.all(0).outerHTML;
}
//--></script>
</head>

<body onLoad="extract()">

<p>
text before...

<iframe src="text.htm" style="display:none">
</iframe>

<span id="file">
</span>

<ilayer src="text.htm">
</ilayer>

...text after
</p>

</body>
</html>

Feedback on 'Q1268 Is there any way to make a document read another document and put it in a layer?'

©2018 Martin Webb