Click to See Complete Forum and Search --> : Countdown script needed plz!
azzkiker
07-24-2003, 08:50 AM
Hello everyone!
This is azzkiker, admin of www.hl2files.com
I would really appreciate it if someone could make me a JavaScript script.
I would like a countdown timer that consists of days, hours, minutes and seconds from teh present GMT time till September the 30th 2003 at 12PM GMT.
I would like it to be similar to the one at the top of the page of http://www.halflife2source.com except the writing is ORANGE and the back ground is BLACK. I would also like the same "bubble" text font.
Please send the script to azzkiker@hl2files.com
Much appreciated and thanx in advance!
¬azzkiker
requestcode
07-24-2003, 10:30 AM
Here is a link to several count down scripts. You may be able to adapt one of them to your needs.
http://www.javascriptkit.com/script/cutindex1.shtml
azzkiker
07-24-2003, 03:45 PM
Thank you a lot requestcode, i will try to find something that suits me but u see, i was hoping some Pro could do me a custom made one as i have no idea whatsoever about Java and customizing it!
¬azzkiker
Charles
07-24-2003, 04:10 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<script type="text/javascript">
<!--
Date.ONE_SECOND = 1000;
Date.ONE_MINUTE = Date.ONE_SECOND * 60;
Date.ONE_HOUR = Date.ONE_MINUTE * 60;
Date.ONE_DAY = Date.ONE_HOUR * 24;
Date.ONE_WEEK = Date.ONE_DAY * 7;
function TimeUntil (d) {this.time = d.getTime ? d.getTime() : Date.parse(d)}
TimeUntil.prototype.valueOf = function () {return this.time - new Date ().getTime()}
TimeUntil.prototype.toString = function () {
var t = Math.abs(this.valueOf());
var d = Math.floor (t / Date.ONE_DAY);
var h = Math.floor ((t % Date.ONE_DAY) / Date.ONE_HOUR);
var m = Math.floor ((t % Date.ONE_HOUR) / Date.ONE_MINUTE);
var s = Math.floor ((t % Date.ONE_MINUTE) / Date.ONE_SECOND);
return (this.valueOf () < 0 ? '-' : '') + [d, d == 1 ? 'day' : 'days', [h, m < 10 ? '0' + m : m, s < 10 ? '0' + s : s].join(':')].join(' ');
}
// -->
</script>
<h1>Example</h1>
<script type="text/javascript">
<!--
var time = new TimeUntil ('30 September 2003 12:00 PM GMT'); // ('1 August 2003 10:00 CDT');
document.write('<p id="time" style="color:#ffa500; background:#000">',time , '</p>');
if (document.getElementById) setInterval ("document.getElementById('time').replaceChild(document.createTextNode (time), document.getElementById('time').firstChild)",0.2 * Date.ONE_SECOND);
// -->
</script>
azzkiker
07-25-2003, 04:33 AM
WOW!!! Thanx a LOT Charles! I owe u one BIG time!!! :D
Can u just tell me one more thing? How can i make it bigger, bolder and change the font style?
I would prefer if someone can TELL me how to do it so i may learn please!
Also, is it possible to make a DIGITAL one?!
Thanx a lot,
¬azzkiker