IE8&9 failing to show text file on second call

B

Bob Miers

I have a WEB index.html page that uses the following code to read and
display a normal text file. (I found this code on the WEB)
It works as advertised, quite well, with all of the browsers (Foxfire,
Apple's, etc.) I've tested except with MS IE8 & IE9.

When I access the WEB page by entering the URL in the address line, I
see the context of the text file as desired,
However if I navigate to any other page on the WEB site and then
return to the Home Page (index.html), the text file
content is not shown. My bypass is to use the "id="dsp">Check with
one of our agents for Our Featured Listing particulars." text
is used. (see code near the end).

I've tried several methods to make the browser not use cache to no
avail. ie <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

Any ideas?

Thanks, Bob Miers

<!--this is the beginning of the code to read a text file
-->
<!-- <meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<title>An XHTML 1.0 Strict standard template</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
-->
<script type="text/javascript">
//<![CDATA[
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope
with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
alert('!IE')
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}
xmlhttp.open("GET","featured.txt" ,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
document.getElementById('dsp').innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send(null)
//]]>
</script>
<!--</head>-->
<!--<body>-->
<div>
<div>
<p align="justify" id="dsp">Check with one of our agents
for Our Featured Listing particulars.</p>
</div>
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top