I have tried alot of things but i don't know really much about javascript. I have a countdown script but it only countdown in seconds but i need hours minutes and seconds.
This is the code:
function countDown($i, $verschil){
$msg = "
<script type='text/javascript'>
var seconds". $i."=". $verschil.";
function display". $i."()
{
seconds". $i."=seconds". $i."-1;
if(seconds". $i."<0)
{
countdown". $i.".innerHTML=\"0\";
}
else
{
var countdown". $i." = document.all? document.all[\"cd".$i."\"] : document.getElementById ? document.getElementById (\"cd". $i."\")
: \"\";
if (countdown". $i.")
{
countdown". $i.".innerHTML=seconds". $i.";
setTimeout('display". $i."()',1000);
}
}
}
display". $i."();
</script>
";
return $msg;
}
- $i = name of countdown, $verschil = Seconds to countdown
I hope someone can help me, tried things for almost 20 hours but i can't get this working.