06-14-2011, 05:10 PM
|
PM User |
#4
|
|
Senior Coder
Join Date: Aug 2006
Location: FL
Posts: 2,764
Thanks: 29
Thanked 453 Times in 447 Posts
|
Comments in RED below:
Quote:
Originally Posted by Soliloquent
I hate saying it, but I'm still learning java, and I need to ask a few dumb questions. What is the breakdown of this script? I understand about half of what it is doing, but not all of it.
If you are trying to learn 'java', then you are on the wrong forum... This is the 'javascript' forum.
That being said, the following are for the script in post #2
I know 11.jpg and 21.jpg are the two images, the HH >= are the hours of 8-6, but will they be set to the server time or local time of the customer? We have several users on pacific time and we are central, and need it to always be on central time.
AFAIK, it is the server time setting. There are correction functions for GMT time zones.
Do a google search with: "javascript Date()" for a description of these functions.
The DOW >= is day of the week? That's where I get confused lol, what does DOW do and what are appropriate changes to be made to it? Such as holidays, I would go and change the script for a few days absence.
DOW is formed from the Date() function to give you the Day_of_Week for the date specified, which is 'now' in the script.
Values returned are 0..6 which represent 'Sunday'..'Saturday'.
In you original post, you made no mention of holidays, absence, etc. so the script above does not account for such. I can expand on the script, but I would need to know ALL information to code for special cases. You could also search this forum for a ton of ideas on how this has been accomplished by others. Sort of depends on how interested you are in learning javascript (not java).
And I think the 'logos' part of the script is for the images. logos [0] is the main image to display during the times set and logos [1] is for the rest of the time?
Correct.
|
|
|
|