Ik zou graag een script willen hebben dat na een aantal seconden doorlinkt naar een andere pagina.

Bijvoorbeeld ik wil dat hij 5 sec op /index.php blijft staan en daarna doorlinkt naar /index2.php

Kan iemand me helpen, dat zou top zijn!


<!-- TWO STEPS TO INSTALL COUNTDOWN REDIRECT:
  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Corey ([email protected] ) -->
<!-- Web Site:   http://six38.tripod.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var start=new Date();
	start=Date.parse(start)/1000;
	var counts=10;
	function CountDown(){
		var now=new Date();
		now=Date.parse(now)/1000;
		var x=parseInt(counts-(now-start),10);
		if(document.form1){document.form1.clock.value = x;}
		if(x>0){
			timerID=setTimeout("CountDown()", 100)
		}else{
			location.href="http://javascript.internet.com"
		}
	}
//  End -->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.setTimeout('CountDown()',100);
-->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
// Cache-busting LUBID bug.
var ran = Math.round(Math.random() * 899999) + 100000;
var lubid_string = "<img src=\"http://lubid.lycos.com/one.asp?site=members.tripod.lycos.com&ord=" + ran + "\" height=\"1\" width=\"1\">";
document.write(lubid_string);
//
//  End -->
</script>
</center>
<FORM NAME="form1">
You are being redirected in 
<INPUT TYPE="text" NAME="clock" SIZE="2" VALUE="10"> 
seconds.
</FORM>
</center>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  1.86 KB -->


Source : Javascript.internet.com

Nog simpeler:

<meta http-equiv="refresh" content="3; url=index2.php">


[edit] Nog 1 :)[/edit]

<head>

<script type="text/javascript">
<!--
var count = 6; // 5 seconden

function counter() 
{
	count--;
	
	if(count == 0) 
	{ 
		window.location = "http://www.jouwwebsite.nl/index2.php"; 
	}

	setTimeout("counter()", 1000); 
}
//-->
</script>
</head>
<body onLoad="counter()">
Hier zet je een melding dat je wordt geredirect

Ik zal er nog meer posten :)
Google naar paar seconden:

<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
    window.location = "../javascriptredirect.php"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
<h2 >Prepare to be redirected!</h2>
<p>This page is a time delay redirect, please update your bookmarks to our new 
location!</p>

</body>
</html>

dus kijk voortaan daar plaats van vragen te stellen omdat je zelf te lui bent :P
Ik dank u allen voor de snelle reactie!
@Robert : zet er dan ook nog even een timer op :)
[edit]
Verdorie, verkeerde knop :S
[/edit]
[edit]
Was te snel ;)
[/edit]
Chris schreef op 27.08.2007 17:09
@Robert : zet er dan ook nog even een timer op :)
[edit]
Verdorie, verkeerde knop :S
[/edit]



Dat zag ik ook dat die er niet stond en is al gedaan ;)
Whaha,, Lol
Ik was iets te snel met reageren Ö <-- Lees als smiley :)
Liever lui dan moe zeg ik dan maar :) Bedankt!

Reageren