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

  • Home
  • SEARCH
  • 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 6186989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:59:05+00:00 2026-05-24T01:59:05+00:00

I have made this timer script but I can’t seem to make it so

  • 0

I have made this timer script but I can’t seem to make it so ti starts onclick.

Here is my whole code:

<script type="text/javascript">
function display( notifier, str ) {
  document.getElementById(notifier).innerHTML = str;
}

function toMinuteAndSecond( x ) {
  return Math.floor(x/60) + ":" + x%60;
}

function setTimer( remain, actions ) {
  (function countdown() {
    display("countdown", toMinuteAndSecond(remain));actions[remain] && actions[remain]();
    (remain -= 1) >= 0 && setTimeout(arguments.callee, 1000);
  })();
}

setTimer(20, {
               20: function () { 
                    display("notifier", "seconds"); 
               },
               1: function () { 
                    display("notifier", "second");
               },

               0: function () { 
                    display("notifier", "seconds");
               }
             }
);
</script>

<!--Start Redirect Countdown-->
<div id="redirect_box" style="display:block;">
Redirecting in <span id="countdown"></span> <span id="notifier"></span>
</div>
<!--End Redirect Countdown-->

<div id="buttonn">Skip >></div>

Skip >> is suppose be the button that starts the timer and the ID, countdown is the actual countdown. And, notifier is just an extra ID.
I hope someone can help

  • 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-24T01:59:06+00:00Added an answer on May 24, 2026 at 1:59 am

    Is this what you’re after? http://jsfiddle.net/JAAulde/Mnqaj/

    If so, all you needed to do is grab the buttonn element and assign an onclick to it.

    That’s, ummm, quite a thingy…

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

Sidebar

Related Questions

I have made some progress with the DataList and UserControl this morning but I
Hi I made this site a while ago in my table days but have
I have roughly the following code. Could this be made nicer or more efficient?
I have been trying everything I can to get this script to work and
OK, I was just fooling around in my spare time and have made this
Hi have made this function which is made to replicate an error that I
This is a C++ class that I have made with n number of pointers.
This is my first winform app in .NET... I have made a couple of
Since I'm sure many people have different standard, I've made this post a community
I have a DLL made in C#, this DLL contains some clases like Creator.

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.