|
-
Dec 29th, 2002, 10:39 AM
#1
Thread Starter
New Member
help me to extend this code
hi!
I need help to extend this code that it will show the days to.
it works with showing the hours, minutes and seconds.
but I don't get it to work with days...
I hope you are able to help me!
here is the code - what I've done by now:
PHP Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
var restzeit = new Number();
var restzeit =<?php echo "$rest"; ?>;
function startCountdown()
{
if((restzeit - 1) >= 0)
{
restzeit = restzeit - 1;
var min_count = restzeit/60;
min_count=Math.floor(min_count);
sec_count = restzeit - (min_count*60);
if(min_count>0)
{
var std_count = min_count/60;
std_count=Math.floor(std_count);
min_count=min_count-std_count*60;
}else
{
var std_count = 0;
}
if(min_count<10)
{
min_angabe='0'+min_count;
}else
{
min_angabe=''+min_count;
}
if(sec_count<10)
{
sec_angabe='0'+sec_count;
}else
{
sec_angabe=''+sec_count;
}
verbleibend.innerText = std_count+' h |'+min_angabe+' min |'+sec_angabe;
setTimeout('startCountdown()',986);
}else
{
verbleibend.innerText = '0:00:00';
setTimeout('history.go()',5000);
}
}
// End -->
</SCRIPT>
Last edited by Stylewriter; Jan 2nd, 2003 at 09:03 AM.
-=|www.mechboxer.de|=-
-
Jan 2nd, 2003, 08:44 AM
#2
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|