SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: Devil jimmy on December 23, 2010, 05:58:52 PM

Title: Countdown Block
Post by: Devil jimmy on December 23, 2010, 05:58:52 PM
could someone help me
I would like a countdown clock to New Year in a portal block html
I would also like to use an image that fits my forum
So in other words
picture via a url that I can use with a countdown clock to New Year
I have already tried something myself without image
since I do not know how to get a picture
but it does not work as I want them
she does not count down
Here's what I did
do not laugh I am a beginner

Code: [Select]
<HTML>
<HEAD>
<script LANGUAGE="JavaScript">
<!--
var now = new Date();
var event = new Date("jan 01 2011 00:00:00");//verander hier de datum
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.hours.value = hours;
document.form1.minutes.value = minutes;
document.form1.seconds.value = seconds;
ID=window.setTimeout("update();",1000);
}
// -->
</script>
</head>

<body>
<font face="Verdana" size="2">Countdown naar 01 Januari 2011</font></p>
<form name="form1"><p align="center"><font face="Verdana" size="2">Dagen <input type="text" name="days" value="0" size="3">
Uren <input type="text" name="hours" value="0" size="4"> Minuten <input type="text" name="minutes" value="0"
size="7"> Seconden <input type="text" name="seconds" value="0" size="7"> </font> </p>
</form>
</body>
</html>

sorry for my bad english I'm belgian
This is a google translation
Title: Re: Countdown Block
Post by: AngelinaBelle on December 23, 2010, 07:01:36 PM
In a HTML block, remove the head and body tags (they are already on the page). You can include the javascript section.
 
After your form, you must include a line of javascript to call your javascript function update.
Otherwise, it is not running.
Title: Re: Countdown Block
Post by: Devil jimmy on December 30, 2010, 06:54:05 AM
thanks for the reply
I have a solution
must therefore be marked as solved
Title: Re: Countdown Block
Post by: AngelinaBelle on January 01, 2011, 11:12:48 AM
I'm glad you have figured it out.
Now, you are ready to count down to 2012!
 
Happy New Year!
SimplePortal 2.3.8 © 2008-2024, SimplePortal