G
Gram
Is there another way to automatically refresh or reload a page, other than
using a meta refresh?
using a meta refresh?
Gram said:Is there another way to automatically refresh or reload a page, other than
using a meta refresh?
Gram said:I have a chat room made with ASP ( I know, there are better ways to do this)
and I am using an iframe to display the conversation text so far. So I have
a meta refresh to keep reloading the text at a regular interval, however, I
also have an anchor tag at the end of the text, so it will automatically
scroll to the bottom, but the meta refresh doesn't woork with the extra
#bottom bit.
<META HTTP-EQUIV='REFRESH' CONTENT='30;URL=conversation.asp#bottom'>
Any thoughts?
mscir said:I have a chat room made with ASP ( I know, there are better ways to do this)
and I am using an iframe to display the conversation text so far. So I have
a meta refresh to keep reloading the text at a regular interval, however, I
also have an anchor tag at the end of the text, so it will automatically
scroll to the bottom, but the meta refresh doesn't woork with the extra
#bottom bit.
<META HTTP-EQUIV='REFRESH' CONTENT='30;URL=conversation.asp#bottom'>
Any thoughts?
Maybe try using Javascript to refresh the page.
this page has the iframe:
<html>
<head>
<script language="JavaScript" type="text/javascript">
function msgRefresh () {
window.frames['iframe1'].location = "2.html#bottom";
window.setTimeout('msgRefresh()',2000);
}
</script>
</head>
<body onload='msgRefresh()'>
test
<hr>
<iframe height="650" width="600" src="2.html" name="iframe1"
scrolling="yes">This browser does not support...</iframe>
<hr>
test
</body>
</html>
2.html, the page loaded into the iframe, includes:
<a name="bottom"> </a>
It seems to work on my ie6 and netscape 7.1
MIke
Gram said:Thanks for the help Mike.
It seems to work grand refreshing the page, however it doesn't seem the like
the anchor (#bottom) part. When I have this part in, I can see the browser
try to reload, but the iframe doesn't change.
When I remove the #bottom, it works perfect, with out the scrolling of
course. Is there any way to keep them independant? to get a seperate
function to scroll it to the bottom?
Also, any ideas why a sumbit button doesn't sumbit when hitting the return
key?
<html>
<head>
<script type="text/javascript">
var milliSecondsToWait = 2000;
function reloadIFrame(){
window.frames['iframe1'].location = "2.html?" + (new Date().getTime());
window.frames['iframe1'].location.hash="#bottom"
myVar = setTimeout("reloadIFrame()",milliSecondsToWait);
}
var myVar = setTimeout("reloadIFrame()",milliSecondsToWait);
</script>
</head>
<body onload='reloadIFrame()'>
test
<p>
<iframe height="450" width="600" src="2.html" name="iframe1"
scrolling="yes">This browser does not support...</iframe>
<p>
test
</body>
</html>
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.