Results 1 to 8 of 8

Thread: refresh the page using javascript...

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    refresh the page using javascript...

    Using javascript i want to refresh my page every 2 minutes....Is there any function in javascript ?

    -------------------
    suresh


  2. #2
    Junior Member
    Join Date
    Nov 2006
    Answers
    25

    Re: refresh the page using javascript...

    Code:
    function reload()
        {
             window.location.reload();
         }
    this method will reload the page when u call the method.....but not for every two minutes......

    the same situation happened for me also ie...to refresh the page every 30 seconds....my friend gave me a piece of code which refreshes every 30 seconds.....but i didn't tried that.....here is that code...

    Code:
    function refreshPeriodic()
    {
       location.reload();
       timerID=setTimeout("refreshPeriodic()",30000);
    }
    timerID=setTimeout("refreshPeriodic()",30000);

    i think it may be useful for u......

    Last edited by TigerElango; 02-03-2007 at 08:25 AM.

  3. #3
    Junior Member
    Join Date
    Nov 2006
    Answers
    25

    Re: refresh the page using javascript...

    Code:
    function refreshPeriodic()
    {
       location.reload();
       timerID=setTimeout("refreshPeriodic()",30000);
    }
    timerID=setTimeout("refreshPeriodic()",30000);
    sorry i don't know why the code is not displayed in the previous reply.........

    Last edited by TigerElango; 02-03-2007 at 08:29 AM.

  4. #4
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: refresh the page using javascript...

    hi elango i can't see the code..can you upload it. don't use "script" tag..you just post the function.

    --------------------
    suresh


  5. #5
    Junior Member
    Join Date
    Nov 2006
    Answers
    25

    Re: refresh the page using javascript...

    Code:
    function refreshPeriodic()
    {
       location.reload();
       timerID=setTimeout("refreshPeriodic()",30000);
    }
    timerID=setTimeout("refreshPeriodic()",30000);



  6. #6
    Expert Member
    Join Date
    Sep 2005
    Answers
    206

    Re: refresh the page using javascript...

    add this

    PHP Code:
    <meta http-equiv="refresh" content="10" 
    refreshes for every 10 sec


  7. #7
    Junior Member
    Join Date
    Dec 2008
    Answers
    1

    Re: refresh the page using javascript...

    Code:
        function reFres() {
      location.reload(true)
    }
    /* Set the number below to the amount of delay, in milliseconds,
    you want between page reloads: 1 minute = 60000 milliseconds. */
    window.setInterval("reFres()",3000);
    // End -->



  8. #8
    Junior Member
    Join Date
    Apr 2009
    Answers
    4

    Re: refresh the page using javascript...

    Code:
    function fun(){
    var a=setTimeout(funName(),1000)
    }
    
    
    



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact