Debt Consolidation - Property in Spain - Find jobs - Society 2007 - Debt Consolidation

PDA

View Full Version : redirect


dean5000v
Feb 16th 2009, 4:48 am
hey im using this to redirect the user to a page within a conditional statment.

<script>location.href='index.php'</script> ";

but i wld like to add a timestamp so that it redirects after 5 seconds, can anyone help ?

NoamBarz
Feb 16th 2009, 5:41 am
function Redirect(){
document.location.href='index.html';
}

<a href="javascript:setTimeout('Redirect()', 5000);"> click </a>

dean5000v
Feb 16th 2009, 5:59 am
i didn't want it as a link, is there a way u can change it so does it automatically !

NoamBarz
Feb 16th 2009, 6:07 am
<body onload="javascript:setTimeout('Redirect()', 5000);">

Just place it in the body tag

ranacseruet
Feb 16th 2009, 7:35 am
window.location = "url";
Should work fine.......