Friday, August 2, 2013

how to auto refresh the page using javascript

write the following javascript in your .aspx page to auto refresh the page in particular interval of time

<head runat="server">
    <title></title>
    <script type="text/javascript">
        var timeout = setTimeout("location.reload(true);", 3000); //3000 - 3 seconds
        function resetTimeout() {
            clearTimeout(timeout);
            timeout = setTimeout("location.reload(true);", 3000);
        }
    </script>
</head>

No comments:

Post a Comment