Time Delayed Redirect

time delayed redirect?

Edit:

The problem i face is that HTML5 is all on one index page. So i need
the timer to start on click of the blog link.

Try calling the setTimeout inside a click handler on the blog link,

$('#blogLink').click (function (e) {
e.preventDefault(); //will stop the link href to call the blog page

setTimeout(function () {
window.location.href = "blog.html"; //will redirect to your blog page (an ex: blog.html)
}, 2000); //will call the function after 2 secs.

});

Try using setTimeout function like below,

setTimeout(function () {
window.location.href = "blog.html"; //will redirect to your blog page (an ex: blog.html)
}, 2000); //will call the function after 2 secs.

PHP - Delay on redirect

You can send php header with timeout refresh. http://php.net/manual/en/function.header.php

<?php 
header( "refresh:5; url=wherever.php" );
?>

Redirect website after specified amount of time

<meta http-equiv="refresh" content="3;url=http://www.google.com/" />

Redirecting the customer to page after some delay

This does not work. It is like:

location.href = "../index.php";
1000;

Obviously the 1000; expression does not nothing.

Use setTimeout:

setTimeout(function() { location.href = "../index.php"; }, 1000);

Delay on redirect (Javascript)

You can use window.location.href

 setTimeout(function(){ window.location.href= 'vault.php';}, 1500);

instead of

setTimeout(function(){ window.location.replace = 'vault.php';}, 1500);

Page Redirect after X seconds wait using JavaScript

It looks you are almost there. Try:

if(error == true){

// Your application has indicated there's an error
window.setTimeout(function(){

// Move to a new location or you can do something else
window.location.href = "https://www.google.co.in";

}, 5000);

}


Related Topics



Leave a reply



Submit