Hey, I need the code for a page which redirects after 10 or 15 seconds, eg index2.php whichthen redirects to index.php, with a thing that counts down to tell you when the page redirects. Thanks.
Printable View
Hey, I need the code for a page which redirects after 10 or 15 seconds, eg index2.php whichthen redirects to index.php, with a thing that counts down to tell you when the page redirects. Thanks.
Haven't tested.HTML Code:<html>
<head>
<title>Redirecting!</title>
<script type="text/JavaScript">
<!--
function countDown() {
var secHold = document.getElementById('seconds');
if(secHold.innerHTML == '1') {
document.location.href = 'index2.php';
} else {
secHold.innerHTML = Number(secHold.innerHTML) - 1;
}
}
-->
</script>
</head>
<body onLoad="setInterval('countDown();', 1000);">
<center> This page will redirect in <div id="seconds">10</div> seconds. </center>
</body>
</html>
Nice ill av a go.
If you still need one tell me, i've got a good one :D
Thanks. I'll rep if it works.