javascript help

For requests for help from CG administrators, Wranglers, and experienced CG members. Please read the FAQ before posting. Also look at CG Wiki for tutorials and how-tos written by other CG webtoonists.
Post Reply
User avatar
Flounderville
Newbie
Posts: 9
Joined: Tue Oct 09, 2007 7:41 am
Contact:

javascript help

Post 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!

User avatar
C.w.
Regular Poster
Posts: 343
Joined: Wed Apr 05, 2006 10:04 pm
Contact:

Post 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)
Image
Other comics i've done
Webpage troubles? HTML Generator to the rescue.

Post Reply