Log in

View Full Version : Redirection



Jamie
17-05-2005, 07:54 PM
Does anyone know the code for redirection, eg: the page will be redirected to the homepage in 7 secs.
Thanks ;)

iRoss
17-05-2005, 08:01 PM
<meta http-equiv="REFRESH" content="5;url=index.php">

It should look like this...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="REFRESH" content="5;url=index.php">
</head>


I think that's it anyway...

Mentor
17-05-2005, 08:08 PM
Or if you for an obscure reason dont want a metter refresh theres a javascript redirect.



<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.yourdomain.com/";
</script>

Jamie
17-05-2005, 08:12 PM
Ok, Thanks ;)
First one worked
Thanks :)

splintercell!
17-05-2005, 08:15 PM
I would use this as it has a timer although all the other methods are perfect..
<script language="JavaScript">
var time = null
function move() {
window.location = 'http://www.yourdomain.com'
}
</script>
that goesin the head tag and then to change the time add this in the body

<body onload="timer=setTimeout('move()',2000)"> thee 2000 is the time so change that to change the time :)

iRoss
17-05-2005, 08:18 PM
Always happy to help :)

@Mentor. Why wouldn't u want 1?!1! It's like the easiest there is :) :o :eusa_shif

Mentor
17-05-2005, 09:09 PM
i did say for any obscure reason. its just another way of doing it.

most efficant way would just be use a php header redirect, but youd need php for that :D

iRoss
18-05-2005, 06:39 AM
lol, yes i suppose you would :)

Want to hide these adverts? Register an account for free!