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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:29:00+00:00 2026-06-02T09:29:00+00:00

<html> <head> <script language=JavaScript> var c1 = 0; var c2 = 0; var c3

  • 0
<html>
    <head>
    <script language="JavaScript">
var c1 = 0;
var c2 = 0;
var c3 = 0;
var o1 = 0;
var o2 = 0;
var o3 = 0;
ID = window.setTimeout("start();", 100);

function start() {
    if (c1 == 59) {
        c1 = 00;;
        if (c2 == 59) {
            c2 = 00;
        }
        else c2++;
    }
    else c1++;

    if (c1 == 0 || c1 == 1 || c1 == 2 || c1 == 3 || c1 == 4 || c1 == 5 || c1 == 6 || c1 == 7 || c1 == 8 || c1 == 9) o1 = "0" + c1;
    else o1 = c1;
    if (c2 == 0 || c2 == 1 || c2 == 2 || c2 == 3 || c2 == 4 || c2 == 5 || c2 == 6 || c2 == 7 || c2 == 8 || c2 == 9) o2 = "0" + c2;
    else o2 = c2;
    if (c3 == 0 || c3 == 1 || c3 == 2 || c3 == 3 || c3 == 4 || c3 == 5 || c3 == 6 || c3 == 7 || c3 == 8 || c3 == 9) o3 = "0" + c3;
    else o3 = c3;

    document.forms[0].elements[0].value = o3 + ":" + o2 + ":" + o1;
    ID = window.setTimeout("start();", 100);
}​
</script>
    </head>
    <body>
        <form name="frm1">
            <input type="text" name="timer1">
            <input type="button" name="but1" value="start" onClick="c1=0; c2=0; c3=0; o1=0; o2=0; 

o3=0; start();">
            <input type=button name="but2" value="stop" onClick="window.clearTimeout(ID);">
        </form>
    </body>
</html>​

Live demo here.

Status Bar gives the error: Object doesn’t support this action.

  • 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-02T09:29:06+00:00Added an answer on June 2, 2026 at 9:29 am

    You get the error in Internet Explorer because there is already a variable start in use, either by the browser itself, or by jsFiddle. After you have used it to define the function, it’s for some reason changed into a variable containing the string "fileopen".

    If you rename the function start to something else, it works:

    http://jsfiddle.net/Guffa/yqsmy/

    Anyhow, you should rather use an interval instead of a timeout for this:

    Javascript:

    var c1, c2, c3, ID = null;
    startTimer();
    
    function startTimer() {
        if (ID != null) {
            stopTimer();
        }
        c1 = 0;
        c2 = 0;
        c3 = 0;
        ID = window.setInterval(run, 100);
    }
    
    function stopTimer() {
        window.clearInterval(ID);
        ID = null;
    }
    
    function run() {
        c1++;
        if (c1 == 60) {
            c1 = 0;
            c2++;
            if (c2 == 60) {
                c2 = 0;
            }
        }
    
        var o1 = (c1 <= 9 ? "0" : "")  + c1;
        var o2 = (c2 <= 9 ? "0" : "")  + c2;
        var o3 = (c3 <= 9 ? "0" : "")  + c3;
        document.forms[0].elements[0].value = o3 + ":" + o2 + ":" + o1;
    }
    

    HTML:

    <form name="frm1">
      <input type="text" name="timer1">
      <input type="button" name="but1" value="start" onclick="startTimer();">
      <input type="button" name="but2" value="stop" onclick="stopTimer();">
    </form>
    

    Demo: http://jsfiddle.net/Guffa/B4a54/7/

    If you want the timer to be exact, you should save the start time in a variable, then subtract that from the current time to get the elapsed time, and only use the interval to display the elapsed time.

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

Sidebar

Related Questions

<html> <head> <script language = javascript> show = function() { document.getElementById(name).innerHTML = window.opener.game.pl.guild.n; var
Sample code: <!DOCTYPE html> <html> <head> <title>test</title> <script language=javascript type=text/javascript> function init() { var
<html> <head> <script language=javascript type=text/javascript > function popupwindow(url, title, w, h) { var left
HTML Code : <html> <head> <script type=text/javascript> function checkforValid(str) { var xmlhttp; if (str.length==0)
See example: <!DOCTYPE html> <html> <head> <title>language</title> <script type=text/javascript src=http://www.google.com/jsapi> </script> </head> <body> <div
Take a look at this html: <head> <title>Test page</title> <script type=text/javascript> function submitForm() {
Heres my simple html source <html> <head> <title> Dec2Bin </title> <script type=text/javascript> function app()
When you execute following example using Firefox 3: <html> <head> <script language=javascript type=text/javascript> <!--
Look at this script: <html> <head> <style> #g{ display:none; } </style> <a href=# onMOUSEOVER=document.getElementById('g').style.display='block'>
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script

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.