Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | DHTML | Q1268 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.