auto refresh for every 5 mins





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







28















this is my code



<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}

</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\squeakerSiSystemsFileWebServicesWebSitesPerforceBhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>

<cfset a= Minute(Now())>
<cfset b=a%5 >
<cfoutput>#b#</cfoutput>
<!--- <cfinclude template="page_move_2.cfm"> --->
<cfloop condition="b gt 0">
<cfoutput>inside loop</cfoutput>
<cfset Sleep(6000)>

<cfset b = b - 1 >

</cfloop>
<cfoutput>hi</cfoutput>
</form>
</body>
</html>


i need to refresh the page for every 5 mins . how to do this . i used sleep() function but ui itself loaded after that sleep() is executed . this me how to reload the page for every 5 mins










share|improve this question


















  • 2





    stackoverflow.com/questions/4644027/auto-reload-web-page

    – AberZombie
    Nov 6 '13 at 9:00


















28















this is my code



<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}

</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\squeakerSiSystemsFileWebServicesWebSitesPerforceBhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>

<cfset a= Minute(Now())>
<cfset b=a%5 >
<cfoutput>#b#</cfoutput>
<!--- <cfinclude template="page_move_2.cfm"> --->
<cfloop condition="b gt 0">
<cfoutput>inside loop</cfoutput>
<cfset Sleep(6000)>

<cfset b = b - 1 >

</cfloop>
<cfoutput>hi</cfoutput>
</form>
</body>
</html>


i need to refresh the page for every 5 mins . how to do this . i used sleep() function but ui itself loaded after that sleep() is executed . this me how to reload the page for every 5 mins










share|improve this question


















  • 2





    stackoverflow.com/questions/4644027/auto-reload-web-page

    – AberZombie
    Nov 6 '13 at 9:00














28












28








28


3






this is my code



<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}

</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\squeakerSiSystemsFileWebServicesWebSitesPerforceBhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>

<cfset a= Minute(Now())>
<cfset b=a%5 >
<cfoutput>#b#</cfoutput>
<!--- <cfinclude template="page_move_2.cfm"> --->
<cfloop condition="b gt 0">
<cfoutput>inside loop</cfoutput>
<cfset Sleep(6000)>

<cfset b = b - 1 >

</cfloop>
<cfoutput>hi</cfoutput>
</form>
</body>
</html>


i need to refresh the page for every 5 mins . how to do this . i used sleep() function but ui itself loaded after that sleep() is executed . this me how to reload the page for every 5 mins










share|improve this question














this is my code



<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}

</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\squeakerSiSystemsFileWebServicesWebSitesPerforceBhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>

<cfset a= Minute(Now())>
<cfset b=a%5 >
<cfoutput>#b#</cfoutput>
<!--- <cfinclude template="page_move_2.cfm"> --->
<cfloop condition="b gt 0">
<cfoutput>inside loop</cfoutput>
<cfset Sleep(6000)>

<cfset b = b - 1 >

</cfloop>
<cfoutput>hi</cfoutput>
</form>
</body>
</html>


i need to refresh the page for every 5 mins . how to do this . i used sleep() function but ui itself loaded after that sleep() is executed . this me how to reload the page for every 5 mins







javascript coldfusion-10






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 6 '13 at 8:58









BhargaviBhargavi

2984719




2984719








  • 2





    stackoverflow.com/questions/4644027/auto-reload-web-page

    – AberZombie
    Nov 6 '13 at 9:00














  • 2





    stackoverflow.com/questions/4644027/auto-reload-web-page

    – AberZombie
    Nov 6 '13 at 9:00








2




2





stackoverflow.com/questions/4644027/auto-reload-web-page

– AberZombie
Nov 6 '13 at 9:00





stackoverflow.com/questions/4644027/auto-reload-web-page

– AberZombie
Nov 6 '13 at 9:00












4 Answers
4






active

oldest

votes


















95














Refresh document every 300 seconds using HTML Meta tag add this inside the head tag of the page



 <meta http-equiv="refresh" content="300">


Using Script:



            setInterval(function() {
window.location.reload();
}, 300000);





share|improve this answer



















  • 4





    The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

    – ekuusela
    Apr 9 '15 at 6:12











  • current code works in normal and ignores post variables. can we do this with post variables?

    – Pradeep Kumar Prabaharan
    May 21 '15 at 5:28



















15














Install an interval:



<script type="text/javascript">    
setInterval(page_refresh, 5*60000); //NOTE: period is passed in milliseconds
</script>





share|improve this answer

































    2















    Page should be refresh auto using meta tag




    <meta http-equiv="Refresh" content="60"> 



    content value in seconds.after one minute page should be refresh







    share|improve this answer































      0














      Auto reload with target of your choice. In this case target is _self set to every 5 minutes.



      300000 milliseconds = 300 seconds = 5 minutes



      as 60000 milliseconds = 60 seconds = 1 minute.



      This is how you do it:



      <script type="text/javascript">
      function load()
      {
      setTimeout("window.open('http://YourPage.com', '_self');", 300000);
      }
      </script>
      <body onload="load()">


      Or this if it is the same page to reload itself:



      <script type="text/javascript">
      function load()
      {
      setTimeout("window.open(self.location, '_self');", 300000);
      }
      </script>
      <body onload="load()">





      share|improve this answer
























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19807665%2fauto-refresh-for-every-5-mins%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        95














        Refresh document every 300 seconds using HTML Meta tag add this inside the head tag of the page



         <meta http-equiv="refresh" content="300">


        Using Script:



                    setInterval(function() {
        window.location.reload();
        }, 300000);





        share|improve this answer



















        • 4





          The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

          – ekuusela
          Apr 9 '15 at 6:12











        • current code works in normal and ignores post variables. can we do this with post variables?

          – Pradeep Kumar Prabaharan
          May 21 '15 at 5:28
















        95














        Refresh document every 300 seconds using HTML Meta tag add this inside the head tag of the page



         <meta http-equiv="refresh" content="300">


        Using Script:



                    setInterval(function() {
        window.location.reload();
        }, 300000);





        share|improve this answer



















        • 4





          The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

          – ekuusela
          Apr 9 '15 at 6:12











        • current code works in normal and ignores post variables. can we do this with post variables?

          – Pradeep Kumar Prabaharan
          May 21 '15 at 5:28














        95












        95








        95







        Refresh document every 300 seconds using HTML Meta tag add this inside the head tag of the page



         <meta http-equiv="refresh" content="300">


        Using Script:



                    setInterval(function() {
        window.location.reload();
        }, 300000);





        share|improve this answer













        Refresh document every 300 seconds using HTML Meta tag add this inside the head tag of the page



         <meta http-equiv="refresh" content="300">


        Using Script:



                    setInterval(function() {
        window.location.reload();
        }, 300000);






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 6 '13 at 9:01









        Krish RKrish R

        19.6k43554




        19.6k43554








        • 4





          The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

          – ekuusela
          Apr 9 '15 at 6:12











        • current code works in normal and ignores post variables. can we do this with post variables?

          – Pradeep Kumar Prabaharan
          May 21 '15 at 5:28














        • 4





          The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

          – ekuusela
          Apr 9 '15 at 6:12











        • current code works in normal and ignores post variables. can we do this with post variables?

          – Pradeep Kumar Prabaharan
          May 21 '15 at 5:28








        4




        4





        The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

        – ekuusela
        Apr 9 '15 at 6:12





        The interval callback only runs once since the reloading stops any scripts from running. setTimeout would achieve the same thing.

        – ekuusela
        Apr 9 '15 at 6:12













        current code works in normal and ignores post variables. can we do this with post variables?

        – Pradeep Kumar Prabaharan
        May 21 '15 at 5:28





        current code works in normal and ignores post variables. can we do this with post variables?

        – Pradeep Kumar Prabaharan
        May 21 '15 at 5:28













        15














        Install an interval:



        <script type="text/javascript">    
        setInterval(page_refresh, 5*60000); //NOTE: period is passed in milliseconds
        </script>





        share|improve this answer






























          15














          Install an interval:



          <script type="text/javascript">    
          setInterval(page_refresh, 5*60000); //NOTE: period is passed in milliseconds
          </script>





          share|improve this answer




























            15












            15








            15







            Install an interval:



            <script type="text/javascript">    
            setInterval(page_refresh, 5*60000); //NOTE: period is passed in milliseconds
            </script>





            share|improve this answer















            Install an interval:



            <script type="text/javascript">    
            setInterval(page_refresh, 5*60000); //NOTE: period is passed in milliseconds
            </script>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 12 '18 at 10:02









            Ronan Boiteau

            5,97451838




            5,97451838










            answered Nov 6 '13 at 9:00









            ClaudixClaudix

            4,269926




            4,269926























                2















                Page should be refresh auto using meta tag




                <meta http-equiv="Refresh" content="60"> 



                content value in seconds.after one minute page should be refresh







                share|improve this answer




























                  2















                  Page should be refresh auto using meta tag




                  <meta http-equiv="Refresh" content="60"> 



                  content value in seconds.after one minute page should be refresh







                  share|improve this answer


























                    2












                    2








                    2








                    Page should be refresh auto using meta tag




                    <meta http-equiv="Refresh" content="60"> 



                    content value in seconds.after one minute page should be refresh







                    share|improve this answer














                    Page should be refresh auto using meta tag




                    <meta http-equiv="Refresh" content="60"> 



                    content value in seconds.after one minute page should be refresh








                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 3 at 9:06









                    Kaushik ShrimaliKaushik Shrimali

                    576




                    576























                        0














                        Auto reload with target of your choice. In this case target is _self set to every 5 minutes.



                        300000 milliseconds = 300 seconds = 5 minutes



                        as 60000 milliseconds = 60 seconds = 1 minute.



                        This is how you do it:



                        <script type="text/javascript">
                        function load()
                        {
                        setTimeout("window.open('http://YourPage.com', '_self');", 300000);
                        }
                        </script>
                        <body onload="load()">


                        Or this if it is the same page to reload itself:



                        <script type="text/javascript">
                        function load()
                        {
                        setTimeout("window.open(self.location, '_self');", 300000);
                        }
                        </script>
                        <body onload="load()">





                        share|improve this answer




























                          0














                          Auto reload with target of your choice. In this case target is _self set to every 5 minutes.



                          300000 milliseconds = 300 seconds = 5 minutes



                          as 60000 milliseconds = 60 seconds = 1 minute.



                          This is how you do it:



                          <script type="text/javascript">
                          function load()
                          {
                          setTimeout("window.open('http://YourPage.com', '_self');", 300000);
                          }
                          </script>
                          <body onload="load()">


                          Or this if it is the same page to reload itself:



                          <script type="text/javascript">
                          function load()
                          {
                          setTimeout("window.open(self.location, '_self');", 300000);
                          }
                          </script>
                          <body onload="load()">





                          share|improve this answer


























                            0












                            0








                            0







                            Auto reload with target of your choice. In this case target is _self set to every 5 minutes.



                            300000 milliseconds = 300 seconds = 5 minutes



                            as 60000 milliseconds = 60 seconds = 1 minute.



                            This is how you do it:



                            <script type="text/javascript">
                            function load()
                            {
                            setTimeout("window.open('http://YourPage.com', '_self');", 300000);
                            }
                            </script>
                            <body onload="load()">


                            Or this if it is the same page to reload itself:



                            <script type="text/javascript">
                            function load()
                            {
                            setTimeout("window.open(self.location, '_self');", 300000);
                            }
                            </script>
                            <body onload="load()">





                            share|improve this answer













                            Auto reload with target of your choice. In this case target is _self set to every 5 minutes.



                            300000 milliseconds = 300 seconds = 5 minutes



                            as 60000 milliseconds = 60 seconds = 1 minute.



                            This is how you do it:



                            <script type="text/javascript">
                            function load()
                            {
                            setTimeout("window.open('http://YourPage.com', '_self');", 300000);
                            }
                            </script>
                            <body onload="load()">


                            Or this if it is the same page to reload itself:



                            <script type="text/javascript">
                            function load()
                            {
                            setTimeout("window.open(self.location, '_self');", 300000);
                            }
                            </script>
                            <body onload="load()">






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 13 '17 at 23:16









                            SeekLoadSeekLoad

                            3771319




                            3771319






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19807665%2fauto-refresh-for-every-5-mins%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                                SQL update select statement

                                'app-layout' is not a known element: how to share Component with different Modules