Forum Moderators: open

Message Too Old, No Replies

autorefresh in pop-up window

just wondering if its possible

         

okowo

7:58 am on Jan 2, 2004 (gmt 0)

10+ Year Member



Hello people,

I have a question, I have this pop-up I'm using for my website, and I want it to autorefresh but i cant use the usual meta code cos the content of the pop-up isn't my stuff. Is there a way to put a refresh command in this java code?

<script language="JavaScript">
<!--
function cc_open() {
window.open('url.html','pop','width=800,height=200,toolbar=No,menubar=No,location=No,scrollbars=No,resizable=No,status=No,width=307,height=235,"')
}
// -->
</script>

Kind reguards and happy 2004 to all

rahmuss

3:24 am on Jan 3, 2004 (gmt 0)

10+ Year Member



Why do you want it to refresh? And how often? I don't know much about Javascript myself; but I think you could possibly do something like this :

function refreshme() {
window.location="url.html";
setTimeout("",5000);
}

And in the body :

<body onload="refreshme()">

Although I think the setTimeout may just pause the whole thing, and do it just once. Anyway... good luck.

CloudLong

7:44 am on Jan 3, 2004 (gmt 0)

10+ Year Member



It is possible, here is the whole script ;)

<html>
<head>
<title>Popup Redirection</title>

<!--
Code By "CodeFreak" Cloud - codefreak.proboards19.com - 2004
You may leave this part of code intact to show your gratitude or remove it
-->
<script language=javascript>
function popitup()
{
popitup=window.open("poppedup.html", "popup", 'width=400,height=200,scrollbars=yes');
}

function reloadit()
{
popitup.location.reload();
}

function closeit()
{
popitup.close();
}

</script>
</head>
<body>
Click <a href="javascript:void(0);" onclick="popitup();">Here</a> to open popup
<br>Even you don't click me, I'll still open the popup after 5 seconds, coz I've set timer.
<br><br>
Click <a href="javascript:void(0);" onclick="reloadit();">Here</a> to refresh
<br>Even you don't click me, I'll still refresh the popup 5 seconds after the popup open, coz I've set timer.

<script>
setTimeout("popitup();", 5000);
setTimeout("reloadit();", 10000);
</script>

<br><br>
Click <a href="javascript:void(0);" onclick="closeit();">Here</a> to close popup
</body>
</html>

okowo

8:22 pm on Jan 3, 2004 (gmt 0)

10+ Year Member



Thanks for the help guys :-)