aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Redirect to Another Page After 5 seconds or Some Time Delay in

Oct 14, 2012

Here I will explain how to redirect to another page after 5 seconds or some time delay in jQuery.

In previous articles I explained JavaScript redirect to another page after 5 seconds,
JQuery display Current Time on WebPage, Disable right click on image and many articles relating to JQuery and JavaScript. Now I will explain how to redirect to another page after 5 seconds or some time delay in jQuery.

To implement this functionality we need to write the following code

<html xmlns="">
<head runat="server">
<title>JavaScript redirect to another page after 5 seconds or Sometime</title>
<script type="text/javascript" src="">
<script type="text/javascript">
var i = 0;
$(document).ready(function() {
function ShowCurrentTime() {
var dt = new Date();
document.getElementById("lblTime").innerHTML = 5 - i + " Seconds";
if (i == 5) {
setTimeout("location.href=''", 0);
window.setTimeout("ShowCurrentTime()", 1000);
<form id="form1" runat="server">
This Page will Redirec to Another Page within:
<label id="lblTime" style=" font-weight:bold; font-size:12pt"></label>


Click Button to Redirect:

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...

hi sir i have a problem with visual studio first i installed visual studio 2010 then i uninstalled it and again install vs 2008 now when i want to create new sql database the error genetared like

"this server virsion is not supported only server upto microsoft sql server 2005 is supported"

i also uninstall sql server 2008 from my computer but this error still come now what i have to ? please sir tell me its urgent

rams said...

Hi, Sir This is anji of your articles followers.Your articles were very fine and Useful for all programmers...can u please send me Jquery basic concepts....?

Waves Group said...
This comment has been removed by the author.
Manoj said...

Not all the time it is working... it works fine in IE. But try to run in firefox or chrome browser.
Try your code once again..

raj said...

sir i want to learn ajax completely.. can u plz help me

Suresh Dasari said...

pls check your code I checked in all the browsers it's working perfectly.

Suresh Dasari said...

Pls check the articles whatever I written for Ajax I explained all the articles.

malthane said...

By: Vijaykumar Malthane
Very nice script; working perfectly in my web pages.

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.