Live clock and associated links

D

Denebola

Could i have a live clock on a webpage and a small area on the page
changes it's picture and link with each second or 60 seconds etc. So
for example, the time is 08:00 and a jpg with link when clicked will go

to a website about breakfast; then at 12:00 the picture and link
changes to a website about lunch etc.


Regards
 
E

Els

Denebola said:
Could i have a live clock on a webpage and a small area on the page
changes it's picture and link with each second or 60 seconds etc. So
for example, the time is 08:00 and a jpg with link when clicked will go

to a website about breakfast; then at 12:00 the picture and link
changes to a website about lunch etc.

Yes, you could do that - just need server side scripting.
But don't forget that 8am where you are, could be 5pm where the
visitor is.
 
D

Denebola

Thanks for your reply but i know absolutely nothing about server side
scripting.... i don't know where to start...... is there a tutorial you
can recommend or at least point me in the right direction
Regards
 
E

Els

Denebola said:
Thanks for your reply but i know absolutely nothing about server side
scripting.... i don't know where to start...... is there a tutorial you
can recommend or at least point me in the right direction

I'd first check which scripting languages are supported on your
server, and then ask again in a newsgroup about that language.
For instance, if your server supports PHP, go to alt.php or a similar
newsgroup for instructions.
 
D

dorayme

Denebola said:
Could i have a live clock on a webpage and a small area on the page
changes it's picture and link with each second or 60 seconds etc. So
for example, the time is 08:00 and a jpg with link when clicked will go

to a website about breakfast; then at 12:00 the picture and link
changes to a website about lunch etc.


Regards


Yes I think you can with javascript and other methods but all
are possibly a bit hard for you... There are a million things to
want. Forget them all. Lets get back to the globe, your first and
nicest idea: let me add more perhaps "not quite on the mark"
advice:

OK, suppose you have taken the movie of a spinning globe (a very
very easy thing to do with modern digital (mainly 'still')
cameras. You are daunted by the idea of getting at all the frames
and don't know software for it well. Don't worry. Just play the
movie on your screen and keep stopping it and screen shot what
you like, (take about twenty, evenly spaced). Turn these into
gifs (You can do this, don't worry, ask). Now run the gifs into
an animated gif builder facility. Let it be jerky and small
rather than smooth and big. It will be cuter that way. Don't try
to be too professional, people will see thru it...

I am warming to your project... but please don't keep changing
it. Be steadfast.

If you have no particular project in mind, make a site about the
conditions of things at various latitudes. This way an image map
(very simple code, easy to give you) will work well on the
spinning earth.

Time (longitude) is very boring. Space, (latitude) is more
interesting.

Why hell, I have a very good digital and will look for a globe
myself.... If I had this digital when I was coming to earth I
would have taken the real thing. There are no Sony central shops
on Mars.
 
A

Andy Dingley

Could i have a live clock on a webpage

It's very difficult and it's not very useful. Almost every user will
already have a clock anyway.

It's _very_ difficult to do this well.
 
H

hywel.jenkins

dorayme said:
Yes I think you can with javascript and other methods but all
are possibly a bit hard for you... There are a million things to
want. Forget them all. Lets get back to the globe, your first and
nicest idea: let me add more perhaps "not quite on the mark"
advice:

No point. It won't do what he wanted to do in that question, and
certainly won't help in this one. That advice has now become "way off
the mark".
 
D

dorayme

No point. It won't do what he wanted to do in that question, and
certainly won't help in this one. That advice has now become "way off
the mark".


OP just wants something that is interesting, live, moving,
snazzy, swinging, rotating. Something! It is no use exploring
every possible idea. The globe was put and it needs exploring.
You must not be so squeamish about flogging dead horses, Hywel.
For things to be way off mark, there needs to be some place where
it was right on mark. Where was that?

Aren't you a teensy weensy bit interested in further ideas of
mine about spinning globes? God damn it, man, I was just getting
going too...
 
D

Denebola

Now call me stupid.... but if i use a script for an analogue
clock.....with hour(h), minute(m), and second(s) hands, surely the
position of the hands is determined by coordinates and if so, then
basic programming will allow me to say, if coordinate (h) and
coordinate (m) and coordinate (s) are true, then let the link in the
webpage equal http://(x). If i can't do this in the 21st century, i'll
be suprised. i could have done in the 80's.......
 
J

Jonathan N. Little

Denebola said:
Now call me stupid.... but if i use a script for an analogue
clock.....with hour(h), minute(m), and second(s) hands, surely the
position of the hands is determined by coordinates and if so, then
basic programming will allow me to say, if coordinate (h) and
coordinate (m) and coordinate (s) are true, then let the link in the
webpage equal http://(x). If i can't do this in the 21st century, i'll
be suprised. i could have done in the 80's.......
If you are talking about JavaScript and capturing mouse click positions
in your calculations, well this can be a browser dependent nightmare.
Sounds what you are looking for would be far better suited for Flash or
Java where all events are contained within the object and animation is
better supported
 
J

Jonathan N. Little

Denebola said:
No....i'm really talking about changing a link depending on the time of
day......
Denebola please learn to quote what you are referring to.

Whose time of day? The client's timezone, the server's timezone, or the
timezone of some place specified on your site?

Links can be changed with JavaScript, if the client does not have it
disabled, but animation and mouse coordinates are better handled with
Flash or Java Applet.
 
D

Denebola

Denebola wrote...."Now call me stupid.... but if i use a script for an
analogue
clock.....with hour(h), minute(m), and second(s) hands, surely the
position of the hands is determined by coordinates and if so, then
basic programming will allow me to say, if coordinate (h) and
coordinate (m) and coordinate (s) are true, then let the link in the
webpage equal http://(x). If i can't do this in the 21st century, i'll
be suprised. i could have done in the 80's......."

I'm sure I have been to websites that when i log in, a personal message
is displayed saying 'Good morning Denebola' or Good evening Denebola'
depending on my local time. Essentially it is this function that I'm
looking for.

Regards.
 
J

Jonathan N. Little

Denebola said:
Denebola wrote...."Now call me stupid.... but if i use a script for an
analogue
clock.....with hour(h), minute(m), and second(s) hands, surely the
position of the hands is determined by coordinates and if so, then
basic programming will allow me to say, if coordinate (h) and
coordinate (m) and coordinate (s) are true, then let the link in the
webpage equal http://(x). If i can't do this in the 21st century, i'll
be suprised. i could have done in the 80's......."

First of all, if I understand you correctly, if you are looking to draw
elements to represent hands of an analog clock, that is 'vector' can
cannot be really done with HTML and JavaScript. To animate the hands you
would need image of each hand in every possible position you want to
display... Next if you want to trap x,y coordinates of mouse clicks in
your link selection well JavaScript is a problem see:

http://www.quirksmode.org/js/events_properties.html
Javascript - Event properties

and

http://www.evolt.org/article/Mission_Impossible_mouse_position/17/23335/
Mission Impossible - mouse position | evolt.org

Not really the 80's but more like the early 90's by my recollection when
Netscape was the browser with events, their method was proprietary, as
with MS's approach to follow and now there are more browsers in the mix...
I'm sure I have been to websites that when i log in, a personal message
is displayed saying 'Good morning Denebola' or Good evening Denebola'
depending on my local time. Essentially it is this function that I'm
looking for.

Yes this is easy to do with JavaScript with localtime function, but the
rest with animation, my point is HTML and JavaScript are not the best
tools. IOW yes you can dig a hole with a teaspoon, but a shovel is a
better suited tool...
 
J

Jose

No....i'm really talking about changing a link depending on the time of
day......

Then you're going about it the hard way. It sounded like you want to
draw a picture (clock) that's different depending on the time of day,
and then changing the link based on a mouse click's relationship to the
picture.

A server script can figure out the server's time of day, but probably
doesn't know the client's time of day. A client side script can
probably determine the client's time of day, and be given the server's
time of day, and pick from a list of links. And you can have a single
link (current_link.html) which points to a page which the server updates
depending on the server's time of day (this of course requires the
cooperation of the hosting company).

However, all of this sounds like fluff that a new user might think
"cool" the first time, but adds little or nothing to the web site.
Instead of saying "I want to do this_cool_thus_and_such", pretend you're
the user who is saying "I want to accomplish this" and then design your
website accordingly.

Back to your original post:
Could i have a live clock on a webpage and a small area on the page
changes it's picture and link with each second or 60 seconds etc. So
for example, the time is 08:00 and a jpg with link when clicked will go

to a website about breakfast; then at 12:00 the picture and link
changes to a website about lunch etc.

Using this example, first, I would never think to click on a clock to go
to a food website. Second, it might be lunch time and I want to see
what was, or will be for breakfast. Your scheme prevents that.

I would have three links: breakfast, lunch, dinner. I would trust the
user to know what meal they are interested in, and click the appropriate
link. I suppose this is low on the cool factor, but high on the useful
factor. It solves the user's problem (I want to know my dinner options
this morning while I'm on the net, and before I go on the outing).

Jose
 
Joined
Sep 11, 2008
Messages
1
Reaction score
0
HTML Live Clock

i'm setting up a clock on my webpage i need it to show up to 7 different times zones but i need the mins different. I can not for the life of me figure it out i have a clock aready i just need to modify it so that the mins are different for each time zone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top