Back to the main page

Mailing List Logs for ShadowRN

Message no. 1
From: loneeagle@********.co.uk (Lone Eagle)
Subject: HTML Question
Date: Tue, 18 Feb 2003 20:22:06 +0000
Does anyone have (or if people are bored can anyone write :-) ) a clock
script? I had one but I it's fragged, I can't get it to work and it's
holding up the roll-out of my site.
In case you haven't guessed I'm trying to get the "It's hh:mm:ss do you
know where your meat body is?" (and I'm trying to get it in real time :D )


--
Lone Eagle
"Hold up lads, I got an idea."

www.wyrmtalk.co.uk - Please be patient, this site is under construction

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d++(---) s++: a->? C++(+) US++ P! L E? W++ N o? K? w+ O! M- V? PS+ PE-()
Y PGP? t+@ 5++ X- R+>+++$>* tv b+++ DI++++ D+ G++ e+ h r* y+>+++++
-----END GEEK CODE BLOCK-----

GCC0.2: y75>?.uk[NN] G87 S@:@@[SR] B+++ f+ RM(RR) rm++ rr++ l++(--) m- w
s+(+++) GM+++(-) A GS+(-) h++ LA+++ CG--- F c+
Message no. 2
From: davidb@****.imcprint.com (Graht)
Subject: HTML Question
Date: Tue, 18 Feb 2003 13:47:40 -0700
At 08:22 PM 2/18/2003 +0000, Lone Eagle wrote:

>Does anyone have (or if people are bored can anyone write :-) ) a clock
>script? I had one but I it's fragged, I can't get it to work and it's
>holding up the roll-out of my site.
>In case you haven't guessed I'm trying to get the "It's hh:mm:ss do you
>know where your meat body is?" (and I'm trying to get it in real time :D )

<script>

//LCD Clock script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

var alternate=0
var standardbrowser=!document.all&&!document.getElementById

if (standardbrowser)
document.write('<form name="tick"><input type="text"
name="tock"
size="11"></form>')

function show(){
if (!standardbrowser)
var clockobj=document.getElementById?
document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var dn="AM"

if (hours=) dn="PM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0) hours
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes

if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+" : "+minutes+" "+dn
else
document.tick.tock.value=hours+" "+minutes+" "+dn
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<font color='lime'> :
</font>"+minutes+" "+"<sup
style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'> :
</font>"+minutes+" "+"<sup
style='font-size:1px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window.onload=show

</script>

--
To Life,
-Graht
ShadowRN Assistant Fearless Leader II
http://www.graht.com
Message no. 3
From: Gurth@******.nl (Gurth)
Subject: HTML Question
Date: Wed, 19 Feb 2003 10:50:55 +0100
According to Lone Eagle, on Tue, 18 Feb 2003 the word on the street was...

> Does anyone have (or if people are bored can anyone write :-) ) a clock
> script? I had one but I it's fragged, I can't get it to work and it's
> holding up the roll-out of my site.

Although I'm not entirely sure it'll work (I didn't test it at all, I just
looked at the JavaScript reference), try this:

<script>
<!--
now = new Date()
document.write(now.getHours() + ":" + now.getMinutes() + ":" +
now.getSeconds())
// -->
</script>

Also stick the following tag into the HEAD of the document, to identify all
scripts on the page as JavaScript:

<meta http-equiv="Content-Script-Type"
content="text/javascript">

--
Gurth@******.nl - http://www.xs4all.nl/~gurth/index.html
... just someone who looks like me ...
-> Probably NAGEE Editor * ShadowRN GridSec * Triangle Virtuoso <-
-> The Plastic Warriors Page: http://plastic.dumpshock.com <-

GC3.12: GAT/! d- s:- !a>? C++(---) UL+ P(+) L++ E W--(++) N o? K w(--)
O V? PS+ PE@ Y PGP- t- 5++ X(+) R+++$ tv+(++) b++@ DI- D+ G+ e h! !r y?
Incubated into the First Church of the Sqooshy Ball, 21-05-1998
Message no. 4
From: loneeagle@********.co.uk (Lone Eagle)
Subject: HTML Question
Date: Wed, 19 Feb 2003 19:32:37 +0000
At 09:50 AM 19/2/2003, Gurth wrote:
> > Does anyone have (or if people are bored can anyone write :-) ) a clock
> > script? I had one but I it's fragged, I can't get it to work and it's
> > holding up the roll-out of my site.
>
>Although I'm not entirely sure it'll work (I didn't test it at all, I just
>looked at the JavaScript reference), try this:

Cheers Graht, Gurth.
I should be able to get it up (as it were <Grin>) now.


--
Lone Eagle
"Hold up lads, I got an idea."

www.wyrmtalk.co.uk - Please be patient, this site is under construction

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d++(---) s++: a->? C++(+) US++ P! L E? W++ N o? K? w+ O! M- V? PS+ PE-()
Y PGP? t+@ 5++ X- R+>+++$>* tv b+++ DI++++ D+ G++ e+ h r* y+>+++++
-----END GEEK CODE BLOCK-----

GCC0.2: y75>?.uk[NN] G87 S@:@@[SR] B+++ f+ RM(RR) rm++ rr++ l++(--) m- w
s+(+++) GM+++(-) A GS+(-) h++ LA+++ CG--- F c+
Message no. 5
From: Gurth@******.nl (Gurth)
Subject: HTML Question
Date: Thu, 20 Feb 2003 10:55:13 +0100
According to Lone Eagle, on Wed, 19 Feb 2003 the word on the street was...

> Cheers Graht, Gurth.
> I should be able to get it up (as it were <Grin>) now.

The only thing is, when I tested the script I came up with, it told the
wrong time :) The hours seemed to be GMT, rather than local time, but I
couldn't find a way to correct it (you could use getUTCHour() instead of
getHour(), but that only made an hour's difference rather than the 2 it
should have been).

--
Gurth@******.nl - http://www.xs4all.nl/~gurth/index.html
... just someone who looks like me ...
-> Probably NAGEE Editor * ShadowRN GridSec * Triangle Virtuoso <-
-> The Plastic Warriors Page: http://plastic.dumpshock.com <-

GC3.12: GAT/! d- s:- !a>? C++(---) UL+ P(+) L++ E W--(++) N o? K w(--)
O V? PS+ PE@ Y PGP- t- 5++ X(+) R+++$ tv+(++) b++@ DI- D+ G+ e h! !r y?
Incubated into the First Church of the Sqooshy Ball, 21-05-1998

Further Reading

If you enjoyed reading about HTML Question, you may also be interested in:

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.