Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8588829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:53:58+00:00 2026-06-11T22:53:58+00:00

Hello i want when my countdown end it should give out as: document.getElementById(remain).innerHTML =

  • 0

Hello i want when my countdown end it should give out as:

document.getElementById("remain").innerHTML = "Time up";

Live countdown here : http://ffsng.deewayz.in/counter/

As its about to end i want to give out put that “Time up”

i tried some thing this way but dint work out.

function setCountDown() {
    seconds--;
    if (seconds < 0) {
        minutes--;
        seconds = 59;
    }
    if (minutes < 0) {
        hours--;
        minutes = 59;
    }
    if (hours < 0) {
        days--;
        hours = 23;
    }
    document.getElementById("remain").innerHTML = days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds";
    if ((seconds = 0) && (minutes = 0) && (hours = 0) && (days = 0))(
        document.getElementById("remain").innerHTML = "time up";
    ) else ( 
        setTimeout("setCountDown()", 1000);
    );  
}

My full codes is here : Countdown timer not working with gmt time

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:53:59+00:00Added an answer on June 11, 2026 at 10:53 pm

    Not pretty well, but for your needs ok!

    HTML

    <div id="countdown">
        <span id="row1"></span><br />
        <span id="row2"></span>
    </div>
    

    JS

    var end = new Date('October 08, 2012 00:55:00');
    
    function toSt1(n) {
        var s = '';
        if (n < 10) s += '0';
        return (s + n).toString();
    }
    
    function toSt2(n) {
        var s = '';
        if (n < 10) s += '00';
        else if (n < 100) s += '0';
        return (s + n).toString();
    }
    
    var countdown = function() {
        var d = new Date();
        var count = Math.floor(end.getTime() - d.getTime());
        if (count > 0) {
            var miliseconds = toSt2(count % 1000);
            count = Math.floor(count / 1000);
            var seconds = toSt1(count % 60);
            count = Math.floor(count / 60);
            var minutes = toSt1(count % 60);
            count = Math.floor(count / 60);
            var hours = toSt1(count % 24);
            count = Math.floor(count / 24);
            var days = count;
            document.getElementById('row1').innerHTML = days + ' Days';
            document.getElementById('row2').innerHTML = hours + ' Hours ' + minutes + ' Minutes ' + seconds + ' Seconds ';
            setTimeout('countdown()', 100);
        } else {
            document.getElementById("countdown").innerHTML = "Time up";
        }
    }
    countdown();
    

    DEMO

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I want write my own desktop sharing application in Java. The application should
hello i want to develop AI car(opponent) in car race game what should be
Hello i want to send to a MySQL data base a date and time
hello i want to make system website like yahoo messenger using PHP. here the
Hello I want to create a performance counter named as FileCopierApp , this should
Hello I want to remove the last word from my sentence in C#. Here
Hello I want to remove all the http://www.domain.com/?h from my mySQL database. ( the
hello i want to change root folder, for example root is: http://mydonmain/ but now
Hello I want to read output of command which gives progress bar like output
Hello I want to know if is possible to modify a cube dimension in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.