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 6729643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:18:53+00:00 2026-05-26T10:18:53+00:00

I have a count down that launches after you click the button. What I’d

  • 0

I have a count down that launches after you click the button. What I’d like to do is have the text and count disappear (“Starting counter here”) after the count of 10 and then change the image from start32.png to stop32.png.

var countdown;
var countdown_number;

function countdown_init() {
    countdown_number = 11;
    countdown_trigger();
}

function countdown_trigger() {
    if(countdown_number > 0) {
        countdown_number--;
        document.getElementById('countdown_text').innerHTML = countdown_number;
        if(countdown_number > 0) {
            countdown = setTimeout('countdown_trigger()', 1000);
        }
    }
}

function countdown_clear() {
    clearTimeout(countdown);
}
<body>
<h2>My page</h2>
<table cellpadding="10">
<tr>
    <td>Click me</td>
    <td><img src = "dashboard/img/start32.png"
            title = "Click me"
            width = "32"
            height = "32"
            border = "0"
            onclick = "countdown_init()">
    </td>
</tr>
</table>

<p>Starting counter here:</p><div id="countdown_text"> </div>


</body>
  • 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-05-26T10:18:54+00:00Added an answer on May 26, 2026 at 10:18 am

    All you need is an else statement and to set the images src. You can get the image by assigning it an id.

    http://jsfiddle.net/6FF3V/1/

        if(countdown_number > 0) {
            countdown = setTimeout('countdown_trigger()', 1000);
        }
        else {
            document.getElementById('timer_image').src = "http://aux.iconpedia.net/uploads/19274250741916216090.png";
            document.getElementById('count_display').style.display = "none";
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a timer that ticks and changes the label to count down
I have a count down timer that beeps every second it counts through AVAudioPlayer.
I am writing a count down timer, using .postdelayed(), that speaks each second as
I have a timer class set up that is basically handling all of count
I have a application which has 6 count down timers. I want the application
I have some jQuery code that I would like reviews and pointers on on
I had this idea of creating a count down timer, like 01:02, on the
I have two queries that I run in the same table: SELECT id, COUNT(up)
I have created a javascript timer that starts at 40 and counts down by
I’m trying to create a count down timer. I user a Timer object that

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.