468,507 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

iframe Refresh Problem

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.responseTex t);
}
}
}
</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.
Jun 13 '06 #1
0 1784

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Conax | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
12 posts views Thread by wangzx | last post: by
26 posts views Thread by shlomi.schwartz | last post: by
1 post views Thread by spolsky | last post: by
3 posts views Thread by PCgeek | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.