In comp.lang.javascript message <UL*********************@bt.com>, Sun,
18 Feb 2007 14:27:59, Gary Jackson <gary.jackson1NOT@THIS.?.com.invalid>
posted:
>I present a*radio show on a voluntary radio station every Sunday
between 3 and 5pm
*
Is there a script which will change one graphic between those times?
*
Be nice if my web page could change to "ON AIR", but it's beyond me how
to do it.
Please do not post in HTML/multipart - FAQ 2.3 para 5.
It is presumably 15:00 to 17:00 LCT (local civil time), independently of
whether we are in Summer or Winter time; and your listeners may all be
using UK/IE time. Otherwise, there is code on my site with which
foreigners can determine UK time; you could adapt that.
Since this is a mere convenience to the reader, you can give them the
burden of having a correctly-set clock. Nowadays, most personal
computer clocks are set from a network time server anyway.
The problem is akin to a graphical-digit clock, as in <URL:
http://www.me
rlyn.demon.co.uk/js-anclk.htm#Dig>; but at each tick you only have to
decide whether you are ON or OFF.
with (new Date()) { D = getDay() ; H = getHours() }
DH = D*24 + H
ON = DH>=15 && DH<17
will do the choosing; you should be able to adapt it for other times of
the week.
You don't need graphics; you could change text, and put it in a large
coloured font.
It's a good idea to read the newsgroup and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.