Clock requests data each tick?

L

Larry

I have a javascript digital clock on my startup page and on another page
in a subfolder. They request data each time the clock ticks. I presume
it is asking for the next digit. I noticed this when running Mozilla, IE
does not give any apparent notice that new info is required.
The clock is an include file in each page. I was thinking of putting it
on other pages but won't if it causes server load for each tick.
Any ideas on how to stop the blinking? Would preloading the clock images
help?

url: http://www.bed-and-breakfast-travel.com/travelaid/travelaid.html

Larry
 
S

Steve Easton

That's just the way they work when done in javascript.
If you use a Java Virtual Machine Applet it won't query the server, but JVM does not come installed
in Newer versions of Windows, therefore it won't work for all visitors.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
K

Kevin Spencer

What do you mean "they request data each time the clock ticks"? I looked at
the script, and it doesn't request data anywhere. All it does is call the
JavaScript date() function, and display it in the page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
L

Larry

Kevin you're looking at the date function. The clock is in the "include
_digitial_clock.html" file and uses js function "show3" to display. This
is the js function:
function show3(){
if (!document.images)
return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
dn="AM"
if ((hours>=12)&&(minutes>=1)||(hours>=13)){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
extract(hours,minutes,seconds,dn)
setTimeout("show3()",1000)
}
/*End show3.*/

Larry
 
A

Andrew Murray

I think he means it accesses the net for each image (each digit) in the
clock - I had a countdown clock that did that....didn't seem to cache the
images after the first visit, and requested from the net each time the clock
counted down through the digits 0-9
 
L

Larry

Did you find some way to fix it or just use something else?


Andrew said:
I think he means it accesses the net for each image (each digit) in the
clock - I had a countdown clock that did that....didn't seem to cache the
images after the first visit, and requested from the net each time the clock
counted down through the digits 0-9
 
L

Larry

Can I presume no reply means no one has any idea on how to fix this
annoying problem?
[other than ditch the clock? -:) }
 

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

Similar Threads


Top