HighDots Forums  

Displaying something at certain time

Javascript JavaScript language (comp.lang.javascript)


Discuss Displaying something at certain time in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ysoussov@gmail.com
 
Posts: n/a

Default Displaying something at certain time - 01-03-2008 , 02:00 PM






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.

Reply With Quote
  #2  
Old   
Doug Gunnoe
 
Posts: n/a

Default Re: Displaying something at certain time - 01-03-2008 , 02:12 PM






On Jan 3, 2:00*pm, "ysous... (AT) gmail (DOT) com" <ysous... (AT) gmail (DOT) com> wrote:
Quote:
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.



Reply With Quote
  #3  
Old   
Anthony Levensalor
 
Posts: n/a

Default Re: Displaying something at certain time - 01-03-2008 , 02:22 PM



ysoussov (AT) gmail (DOT) com said:

Quote:
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!


--
anthony at my pet programmer dot com


Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Displaying something at certain time - 01-03-2008 , 02:29 PM



Doug Gunnoe wrote:
Quote:
On Jan 3, 2:00 pm, "ysous... (AT) gmail (DOT) com" <ysous... (AT) gmail (DOT) com> wrote:
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.
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
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.