Results 1 to 19 of 19

Thread: Countdown timer

  1. #1
    Administrator nelson's Avatar
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    3,716

    Exclamation Countdown timer

    I've added the countdown timer on the bottom of the splash (home page):

    http://michaelbay.com/

    1.- It appears on Safari on the Mac but not on Firefox.

    2.- Is the timer visible on Firefox, IE, & Sadari on Windows XP/Vista?

  2. #2
    Senior Member Firefrost's Avatar
    Join Date
    Jun 2008
    Location
    Mickey Mouseville, Fl
    Posts
    1,385

    Default Re: Countdown timer

    If the home page is the splash page then no on Firefox PC
    "...take it away but I want more and more, one day I'm gonna lose the war."
    www.myspace.com/tremorjames


  3. #3
    Senior Member Mindfreak87's Avatar
    Join Date
    Apr 2009
    Posts
    492

    Default Re: Countdown timer

    Works in Google Chrome but not the latest version of Firefox. [Windows XP][PC]

  4. #4
    Administrator nelson's Avatar
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    3,716

    Default Re: Countdown timer

    Yes, splash = home.

  5. #5
    Senior Member Trailbreaker's Avatar
    Join Date
    Feb 2008
    Location
    Upstate New York
    Posts
    10,428

    Default Re: Countdown timer

    Firefox + XP, nothing.
    "The trouble with quotes on the internet is that you can never know if they're genuine." - Abraham Lincoln

  6. #6
    Administrator nelson's Avatar
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    3,716

    Default Re: Countdown timer

    How about IE (Internet Explorer) Vista/XP ?

  7. #7
    Senior Member Mindfreak87's Avatar
    Join Date
    Apr 2009
    Posts
    492

    Default Re: Countdown timer

    IE Explorer v. 7.0.5730.13 works [Windows XP][PC]

  8. #8
    Senior Member Michael Do's Avatar
    Join Date
    Jan 2008
    Location
    Baltimore, Maryland, United States
    Posts
    1,551

    Default Re: Countdown timer

    doesn't work on FF 3.0.10 (XP)
    work on IE 8 (xp)
    Quote Originally Posted by Someone from IMDB
    Why does Will Smith always play a black man?

    My Blu-ray collection.

  9. #9
    Administrator nelson's Avatar
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    3,716

    Default Re: Countdown timer

    :wtf


    Ok, I give up. Usually it works on everything but IE. Now this time it wont appear on FF on Mac or PC.

    Any help would greatly be appreciated!

  10. #10
    Banned
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    6,713

    Default Re: Countdown timer

    lol, everyone is making girls there new avvy's, ill get in on this

  11. #11
    Administrator sora's Avatar
    Join Date
    Aug 2007
    Posts
    4,175

    Default Re: Countdown timer

    The javascript console of Firefox gave the error message like this..

    document.all has no properties
    http://www.michaelbay.com/countdown.js

    09 is not a legal ECMA-262 octal constant
    countdown_clock (09, 06, 24, 00, 00, 1);
    Maybe "document.all" references in the script are causing the problem. Found some links talking about this..

    http://www.codingforums.com/archive/...p/t-69468.html
    http://www.webdeveloper.com/forum/sh...d.php?t=128269

  12. #12
    Administrator sora's Avatar
    Join Date
    Aug 2007
    Posts
    4,175

    Default Re: Countdown timer

    Fixed the script, This appears on IE, Firefox and safari (Vista).

    function countdown_clock(year, month, day, hour, minute, format)
    {
    //I chose a div as the container for the timer, but
    //it can be an input tag inside a form, or anything
    //who's displayed content can be changed through
    //client-side scripting.
    html_code = '<div id="countdown"></div>';
    document.write(html_code);
    countdown(year, month, day, hour, minute, format);
    }
    function countdown(year, month, day, hour, minute, format)
    {
    Today = new Date();
    Todays_Year = Today.getFullYear() - 2000;
    Todays_Month = Today.getMonth() + 1;
    //Convert both today's date and the target date into miliseconds.
    Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(),
    Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();
    Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();
    //Find their difference, and convert that into seconds.
    Time_Left = Math.round((Target_Date - Todays_Date) / 1000);
    if(Time_Left < 0)
    Time_Left = 0;
    switch(format)
    {
    case 0:
    //The simplest way to display the time left.
    document.getElementById('countdown').innerHTML = Time_Left + ' seconds';
    break;
    case 1:
    //More datailed.
    days = Math.floor(Time_Left / (60 * 60 * 24));
    Time_Left %= (60 * 60 * 24);
    hours = Math.floor(Time_Left / (60 * 60));
    Time_Left %= (60 * 60);
    minutes = Math.floor(Time_Left / 60);
    Time_Left %= 60;
    seconds = Time_Left;
    dps = 's'; hps = 's'; mps = 's'; sps = 's';
    //ps is short for plural suffix.
    if(days == 1) dps ='';
    if(hours == 1) hps ='';
    if(minutes == 1) mps ='';
    if(seconds == 1) sps ='';
    document.getElementById('countdown').innerHTML = days + ' day' + dps + ': ';
    document.getElementById('countdown').innerHTML += hours + ' hour' + hps + ': ';
    document.getElementById('countdown').innerHTML += minutes + ' minute' + mps + ': ';
    document.getElementById('countdown').innerHTML += seconds + ' second' + sps;
    break;
    default:
    document.getElementById('countdown').innerHTML = Time_Left + ' seconds';
    }
    //Recursive call, keeps the clock ticking.
    setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');',
    1000);
    }
    Last edited by sora; 05-14-2009 at 08:49 PM.

  13. #13
    Administrator nelson's Avatar
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    3,716

    Default Re: Countdown timer

    Thanks a lot Sora!


  14. #14
    Senior Member Mindfreak87's Avatar
    Join Date
    Apr 2009
    Posts
    492

    Default Re: Countdown timer

    It works now in Firefox, well done Sora.

  15. #15
    Senior Member Trailbreaker's Avatar
    Join Date
    Feb 2008
    Location
    Upstate New York
    Posts
    10,428

    Default Re: Countdown timer

    There we go! Sora you are da bomb!
    "The trouble with quotes on the internet is that you can never know if they're genuine." - Abraham Lincoln

  16. #16
    Senior Member megatron42's Avatar
    Join Date
    Sep 2007
    Location
    some where on earth
    Posts
    6,805

    Default Re: Countdown timer

    i can sse the timer just fine.. on XP
    we decepticons now face our darkest hour:megatron from transformers prime

  17. #17
    Administrator sora's Avatar
    Join Date
    Aug 2007
    Posts
    4,175

    Default Re: Countdown timer

    My pleasure.

  18. #18
    Banned
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    6,713

    Default Re: Countdown timer

    badda bing!!!!!!!!

    it worrrkkks

  19. #19
    Senior Member xana's Avatar
    Join Date
    Sep 2007
    Location
    your freaking suitcase.
    Posts
    490

    Default Re: Countdown timer

    nice. Was wondering where that went.
    This is Ferngully, bitch!


Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •