A
Abhishek Srivastava
Hello Everyone,
I have two files. File 1 is called HTMLPage.html. The content of this file
is
<html><head><meta http-equiv='refresh' content='1'
/></head><body><table><tr><td>0/0</tr></td></table></body></html>
If I view this file in IE, as expected the browser refreshes itself every 1
sec.
I have a second file which is called Test.html. The content of this file is
<html>
<head>
<script language="javascript">
var oHTTP;
var ifr;
function foo()
{
ifr = document.getElementById('ifr');
oHTTP = new ActiveXObject("Microsoft.XMLHTTP");
oHTTP.onreadystatechange = test;
oHTTP.open("GET", "HTMLPage.htm", true);
oHTTP.send(null);
}
function test()
{
if (oHTTP.readyState == 4)
{
if (oHTTP.status == 200)
{
ifr.contentWindow.document.write(oHTTP.responseText);
}
}
}
</script>
</head>
<body>
<form>
<input id="test" type="button" value="OK" onclick="javascript:foo()" />
<br/>
<iframe id="ifr" style="display:block" src="" scrolling="no"></iframe>
</form>
</body>
</html>
Basically, this file is trying to display the first file in an Iframe and
gets the content async.
The content is shown successfully. but the iframe does not refresh itself
every 1 sec as it was doing when the first file was loaded. The iframe seems
to be ignoring the meta fresh header.
Can anyone let me know why doesn't the iframe refresh itself when the same
HTML is displayed in an iframe? How can the iframe be made to refresh itself
every 1 sec?
regards,
Abhishek.
I have two files. File 1 is called HTMLPage.html. The content of this file
is
<html><head><meta http-equiv='refresh' content='1'
/></head><body><table><tr><td>0/0</tr></td></table></body></html>
If I view this file in IE, as expected the browser refreshes itself every 1
sec.
I have a second file which is called Test.html. The content of this file is
<html>
<head>
<script language="javascript">
var oHTTP;
var ifr;
function foo()
{
ifr = document.getElementById('ifr');
oHTTP = new ActiveXObject("Microsoft.XMLHTTP");
oHTTP.onreadystatechange = test;
oHTTP.open("GET", "HTMLPage.htm", true);
oHTTP.send(null);
}
function test()
{
if (oHTTP.readyState == 4)
{
if (oHTTP.status == 200)
{
ifr.contentWindow.document.write(oHTTP.responseText);
}
}
}
</script>
</head>
<body>
<form>
<input id="test" type="button" value="OK" onclick="javascript:foo()" />
<br/>
<iframe id="ifr" style="display:block" src="" scrolling="no"></iframe>
</form>
</body>
</html>
Basically, this file is trying to display the first file in an Iframe and
gets the content async.
The content is shown successfully. but the iframe does not refresh itself
every 1 sec as it was doing when the first file was loaded. The iframe seems
to be ignoring the meta fresh header.
Can anyone let me know why doesn't the iframe refresh itself when the same
HTML is displayed in an iframe? How can the iframe be made to refresh itself
every 1 sec?
regards,
Abhishek.