...

View Full Version : Changing image



Badman3k
07-13-2003, 04:14 PM
I have a website that has a Background image in a seperate layer. The ID tag for the image is 'BgImage'.
I want the image to change depending on the time of day.
If it is night time i want the image to be ../images/background-night.jpg, but if it's the day time, i want the image to be ../images/background.jpg.

Day time is between 7am to 5pm and then night is 5pm to 7am

I have tried multiple ways to try and solve this problem, but i always get errors.

I hope that someone will be able to help.

Many Thanks in advance,

::The Badman::

Gordo
07-13-2003, 07:30 PM
I did a specific Google search (http://www.google.com/search?as_q=image+javascript+display&num=30&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=time+of+day&as_oq=&as_eq=&lr=lang_en&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=images) and came up with the following (in no particular order):

http://tech.irt.org/articles/js023/

http://www.htmlgoodies.com/JSBook/backgroundtime.html

http://javascriptkit.com/script/script2/timeback.shtml

Hope those are helpful. If not, then you'll probably need to give us a link to your test page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum