General Community > Scripting Help

dhtml countdown using server time

(1/1)

Tim:
I'm looking for a script that counts down the days, hours, minutes and seconds to an event, using the servertime, so it'll be the same all over the world.

An example can be found at http://www.ferrariworld.com

anyone know where I might find this?

[Unknown]:
var currentTime = ' . time() . ', destTime = ' . $desinationTimestamp . ';

setTimeout(updateTime, 1);

function updateTime()
{
   currentTime++;

// You know the rest.

   setTimeout(updateTime, 1);
}

-[Unknown]

Navigation

[0] Message Index

Go to full version