Be a Supporter!

Html clock

  • 715 Views
  • 5 Replies
New Topic Respond to this Topic
illicit
illicit
  • Member since: Oct. 17, 2001
  • Offline.
Forum Stats
Member
Level 17
Artist
Html clock 2002-02-11 07:37:16 Reply

Looking for the code or info into the coding for a website clock " of time" not counter. Any info is greatful. I'm not having any luck, just direct me somewhere is all I really ask.

tHANKS, iLLiCit147

Html clock

THESILENT1
THESILENT1
  • Member since: Nov. 21, 2000
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Html clock 2002-02-11 09:12:31 Reply

Hey, dose it have to b in HTML, how about java script you can get many things like this from http://javascript.internet.com and they come with instruction on how to enter them in to your HTML, like the one on my site, it is actually in the status bar http://www.angelsdeservetodie.tk, kool, eh?
n e ways i hope that i have helped
-Kirk

AlertTheInternet
AlertTheInternet
  • Member since: Dec. 19, 2000
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to Html clock 2002-02-12 10:12:38 Reply

You can't make them from html. If you have a crappy free host like geoshities or angelshite then you will have to use javascript but they only appear in the status bar. For the best clocks, use php or perl or even better Flash.

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to Html clock 2002-02-12 15:39:50 Reply

At 2/12/02 10:12 AM, S-F wrote: If you have a crappy free host like geoshities or angelshite then you will have to use javascript but they only appear in the status bar.

Err, no. Not true. Have a look at this example I just knocked together. And before there are any quips at how this looks in Netscape, it's just an example!

For the best clocks, use php or perl

This guy's talking about a clock. At best (without refreshing the page regularly, at least) you can print the date and time. Fine if you're looking to log something, or print the date from a specific offset from GMT, but not very dynamic (and certainly not what you'd expect from a clock - clocks tick over, they don't stay put (unless they're broken)).

or even better Flash.

And by using flash, you'd presumably be using its actionscripting, which is loosely based on JavaScript - another example of use outside the status bar :0)

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Html clock 2002-02-12 15:54:02 Reply

At 2/12/02 10:12 AM, S-F wrote: You can't make them from html. If you have a crappy free host like geoshities or angelshite then you will have to use javascript but they only appear in the status bar. For the best clocks, use php or perl or even better Flash.

Don't listen to S-F.
Here's how you can do it with JavaScript:

function SystemClock() {
var time=new Date()
var x=time
var y=x.getDate(); (y<10) ? y="0"+y : y
var z=x.getYear(); (z>70 && z<=99) ? z="19"+z : z="20"+z
var hs=x.getHours(); (hs<10) ? hs="0"+hs : hs
var ms=x.getMinutes();(ms<10) ? ms="0"+ms : ms
var ss=x.getSeconds();(ss<10) ? ss="0"+ss : ss
ST=days[x.getDay()]+", "+y+" "+months[x.getMonth()]+" "+z+" "+hs+":"+ms+":"+ss;
document.clockForm.digits.value=ST+" "+"YST";
id=setTimeout("SystemClock()",1000)
}

call SystemClock() function in the BODY's onLoad() method.

and if you have a FORM named 'clockForm' with an element named 'digits', then the time should show up in there.

illicit
illicit
  • Member since: Oct. 17, 2001
  • Offline.
Forum Stats
Member
Level 17
Artist
Response to Html clock 2002-02-20 05:52:12 Reply

ThanX iLLiCit147,

" I'm a blonde female trying to make a website"
Okay!