Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Changing image

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post

    Angry Changing image

    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::
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    TEXAS . . . 'nuf said
    Posts
    468
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did a specific Google search 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.
    Gordo
    "In the End, we will remember not the words of our enemies, but the silence of our friends."
    - Martin Luther King Jr. (1929-1968)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •