Displaying something at certain time

Y

ysoussov

Hey Everyone,
I was wondering is there a way to have something display on my
webpage during business hours and then disappear when it is not
business hours? it just needs to be a checkbox nothing fancy. I would
also like it to display according to server time rather then client
time.
 
D

Doug Gunnoe

Hey Everyone,
    I was wondering is there a way to have something display on my
webpage during business hours and then disappear when it is not
business hours? it just needs to be a checkbox nothing fancy. I would
also like it to display according to server time rather then client
time.

Since you are wanting to use server time, I think the only way to do
this would be a server side script like php.
 
A

Anthony Levensalor

(e-mail address removed) said:
Hey Everyone,
I was wondering is there a way to have something display on my
webpage during business hours and then disappear when it is not
business hours? it just needs to be a checkbox nothing fancy. I would
also like it to display according to server time rather then client
time.


You could conceivably get the time from SSI with:

<!--#echo var="DATE_LOCAL" -->

But that's if you're running Apache, and have Server Side Includes
turned on. Most will have a facility for Server Side Includes, though I
don't have a clue about MS server solutions.

~A!
 
T

Thomas 'PointedEars' Lahn

Doug said:
Since you are wanting to use server time, I think the only way to do
this would be a server side script like php.

It can be a combination of a client-side and a server-side script. While
server-side script A could generate the element during business ours and not
otherwise, the client-side script could make a repeated request to
server-side script B to determine the server time, and show or hide the
corresponding element(s) when the document resource has already been
rendered but was not requested in between. Another, simpler and slightly
more compatible approach would be an iframe which document is generated by
the server-side script which is reloaded in regular intervals by the
client-side script.


PointedEars
 

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,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top