/    Sign up×
Community /Pin to ProfileBookmark

code problem

hey i just found a code but can someone mark in red the bit i change to make it count down

<!– THREE STEPS TO INSTALL NUMBER COUNTDOWN:

  • 1. Copy the coding into the HEAD of your HTML document

  • 2. Add the onLoad event handler into the BODY tag

  • 3. Put the last coding into the BODY of your HTML document –>
  • <!– STEP ONE: Paste this code into the HEAD of your HTML document –>

    <HEAD>

    <SCRIPT LANGUAGE=”JavaScript”>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>
    <!– Ben ([email protected]) –>

    <!– Begin
    <!–
    var g_iCount = new Number();

    // CHANGE THE COUNTDOWN NUMBER HERE – ADD ONE TO IT //
    var g_iCount = 11;

    function startCountdown(){
    if((g_iCount – 1) >= 0){
    g_iCount = g_iCount – 1;
    numberCountdown.innerText = ’00:00.0′ + g_iCount;
    setTimeout(‘startCountdown()’,1000);
    }
    }
    // End –>
    </script>

    </HEAD>

    <!– STEP TWO: Insert the onLoad event handler into your BODY tag –>

    <BODY onLoad=”startCountdown()”>

    <!– STEP THREE: Copy this code into the BODY of your HTML document –>

    <font face=”Digital Readout Upright” color=”blue” size=”7″>
    <div align=”center” id=”numberCountdown”></div>
    </font>

    <p><center>
    <font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br>
    by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
    </center><p>

    <!– Script Size: 1.33 KB –>

    to post a comment
    JavaScript

    5 Comments(s)

    Copy linkTweet thisAlerts:
    @sta12sMar 18.2006 — Ok, look for the "+" and change it a -

    I'm not gonna mark it in red 'cause it's uber easy ... just look for the ONLY "+" in da code

    -Sta12s
    Copy linkTweet thisAlerts:
    @felgallMar 18.2006 — You don't need to change the + to a -

    The only + in the code is concatenating two strings.

    There is already a - where the code is counting down.

    The problem is that this code uses innerText which is non-standard code and doesn't work in most browsers. Change the innerText to innerHTML to fix it.
    Copy linkTweet thisAlerts:
    @bwtauthorMar 18.2006 — look ive tried to change this loads but when it counts down it goes

    from-

    10:08:09

    to 10:08:00

    but i want it to continue till its 0:00:00
    Copy linkTweet thisAlerts:
    @sta12sMar 18.2006 — thx Felgall ... I see where my advice was uber wrong - lol

    The code is counting down from 11, is that a large enough number considereing you want it to count down to 0:00:00?

    Try increasing the value of g_iCount and see what happens ... what do you think Felgall?
    Copy linkTweet thisAlerts:
    @bwtauthorMar 19.2006 — i will try
    ×

    Success!

    Help @bwt spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.10,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...