Page 1 of 1

javascript help

Posted: Sat Dec 01, 2007 10:07 am
by Flounderville
Q: Is this the right place to post this?

A: I do not know.

Here's what I want to do...I want to make (tasteful and subtle!) holiday-and-other-important-occasions-themed background images for my website, and set them up so that they only show up on certain days, while non-important days would have the default background.

I'm guessing that I can do this with Javascript, but I don't know how.

I found this script, http://javascript.internet.com/time-dat ... xpire.html, and I'm wondering if it can be changed to suit my needs (and how to go about doing that), or if I need to keep looking for a different script.

...or would my idea even work at all?

My skill level in HTML and CSS is intermediate, and my Javascript knowledge is slightly-higher-than-beginner, I guess.

Thanks!

Posted: Sat Dec 01, 2007 1:37 pm
by C.w.
I have a script called that gets the true date from the comicgenesis server - with that you could write some code like this

(not actual code)

Code: Select all

if (20070101 < truedate < 20070202)
then {
document.body.style.background="url(festive.jpg)"
}
The script is in the javascript section of the HTML generator. (Link in Signature)