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>