problem doubling the scrip

wxdqz

New Member
hi,
my problem is very simple (i hope :rolleyes: ) but unsolvable for me ;)

i found this nice, short and working countdown script and simply want to run two or more countdowns with it. i have doubled everything (head and body part) already and renamed the form and partly the variables but it did not work in the end...

here it is (unedited):

---------------------------

<script LANGUAGE="JavaScript">
<!--
var now = new Date();
var event = new Date("Jan 1 2006 00:00:02");
var seconds = (event - now) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (event - now) / 1000;
seconds = Math.round(seconds);
minutes = seconds / 60;
minutes = Math.round(minutes);
hours = minutes / 60;
hours = Math.round(hours);
days = hours / 24;
days = Math.round(days);
document.form1.days.value = days;
document.form1.seconds.value = seconds;
ID=window.setTimeout("update();",1000);
}
// -->
</script>



<form name="form1" class="buttonsend">
<input type="text" class="buttonview" name="days" value=http://www.webdeveloper.com/forum/archive/index.php/"0" size="2">
<input type="text" name="seconds" class="buttonview" value="0" size="8">

----------------------------------------------------

i'm glad about any usefull proposals. best it would be to show me some edited lines. my java script knowledge is ehm... limited ^^

thx
vaddibaer
 
Top