Friday, April 27, 2012

How to make delay in page and after that redirect to another page using JAVASCRIPT


<script type="text/javascript">
function sleepMethod()
{
    window.setTimeout("Delaymehod()",15000);
}
function Delaymehod()
{
var Redirect = '<%=ConfigurationManager.AppSettings["URLRedirect"].ToString() %>';
     window.location = Redirect;
}
</script>

//Note:Here Time is measured in Mili second means 15000=15 seconds,so you can increase page delay time as your need.

No comments:

Post a Comment