Jump to content

Trade deadline countdown?


ceffa2000

Recommended Posts

Posters,

What does everyone think of having a trade countdown timer on the Inside Beat page? It could be at the top of the page but I have no idea how to write the script for it and figured if it was something people would be in favor of, somebody might know how to do it. I know CBS Sportsline has a counter on their page so I'm not sure if you could snag that code or anything.

 

I want to make sure its not going to drive anyone crazy in the process.

 

Repsond so we could take an informal poll to gauge interest.

Link to comment
Share on other sites

QUOTE(ceffa2000 @ Jul 29, 2005 -> 10:12 AM)
Posters,

What does everyone think of having a trade countdown timer on the Inside Beat page? It could be at the top of the page  but I have no idea how to write the script for it and figured if it was something people would be in favor of, somebody might know how to do it.  I know CBS Sportsline has a counter on their page so I'm not sure if you could snag that code or anything.

 

I want to make sure its not going to drive anyone crazy in the process.

 

Repsond so we could take an informal poll to gauge interest.

that would be cool i guess.
Link to comment
Share on other sites

I believe this is the java code or whatever that CBS Sportsline has:

 

<!-- START COUNTDOWN -->

<!--

.clockFace, .clockTxt  {font-family:arial,helvetica,sans-serif;font-size: 11px;color:#000000;}

.clocklabel            {font-family:arial,helvetica,sans-serif;font-size: 11px;color:#26248E;}

.clockborder {border:1px solid #26248E;}

-->

 

<!--tr>

>

TRADE DEADLINE:

   

   

   

   

   

   

days hrs min sec

AD IMAGE GOES HERE

<script language="javascript">

var nTime;

//  Date.UTC(YYYY, MM, DD[, hh[, mm[, ss[, ms]]]])

 

// TARGET DATE

var Tyear=2005;

var Tmonth=7; //ex. Jan.=1, Feb.=2

var Tday=31;

var Thour=16;

var Tmin=0;

var Tsec=0;

var Tms=0;

 

// adjust for EST

Tmonth = Tmonth-1; Thour=Thour+4;

var nTarget = Date.UTC(Tyear, Tmonth, Tday, Thour, Tmin, Tsec, Tms);

 

function drawCountdown(layer,text) {

    if (DOM && document.getElementById(layer)) {

        document.getElementById(layer).innerHTML = text;

        }

    else if (IE && document.all[layer]) {

        document.all[layer].innerHTML = text;

        }

    }

 

function Tick() {

var dNow = new Date();

nTime = nTarget - dNow.valueOf(); // milliseconds until target

if (nTime

nTime = Math.floor(nTime / 1000); // seconds until target

// Display("cdDay2", "cdDay1", "cdDay0", 86400); // seconds per day

Display(null, "cdDay1", "cdDay0", 86400); // seconds per day

Display(null, "cdHour1", "cdHour0", 3600); // seconds per hour

Display(null, "cdMinute1", "cdMinute0", 60); // seconds per minute

Display(null, "cdSecond1", "cdSecond0", 1); // seconds per second

    }

 

function Display(el2, el1, el0, nDivisor) {

var nValue = (nTime - (nTime %= nDivisor)) / nDivisor;

 

drawCountdown(el0,(nValue % 10));

nValue = Math.floor(nValue / 10);

drawCountdown(el1,(nValue % 10));

if (el2) {

        nValue = Math.floor(nValue / 10);

        drawCountdown(el2,(nValue % 10));

  }

    }

 

if (IE || DOM) {

Tick();

window.setInterval('Tick()', 1000);

    }

 

   

<!-- END COUNTDOWN -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...