How to make a time counter in the webpage

Posted on 2006-03-20
Last Modified: 2013-12-16
I need to set a time counter. Then it may used for fixed time interval  refreshing webpage by AJAX.
Question by:turbot_yu
    LVL 35

    Assisted Solution


    Like that?  (the javascript is in the HTML source of the page)

    LVL 32

    Accepted Solution

    Or you can use setInterval() which repeats it's self more than once



    which calls the function reloadPageByAjax() each minute.


    calls the function reloadPageByAjax() after 60 seconds, but then it doesn't call it again after 120, 180, 240 seconds etc.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Title # Comments Views Activity
    Javascript and mvc 12 36
    Datatables Select All from Filtered Rows 2 34
    PHP Radio Array 4 27
    Problem to echo 6 29
    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
    The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now