View Full Version : Page redirect wiht countdown.
reindeer.
29-09-2006, 03:54 PM
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.
<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>
Haven't tested.
Kymux
29-09-2006, 08:40 PM
Nice ill av a go.
Butter'dToast
30-09-2006, 09:59 AM
If you still need one tell me, i've got a good one :D
reindeer.
30-09-2006, 10:53 AM
Thanks. I'll rep if it works.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.