Results 1 to 2 of 2

Thread: I need a script to show differnt content at different times of the day.

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question I need a script to show differnt content at different times of the day.

    I want to have a slide show of images on a page that changes the pictures in the show at different times of the day.

    Say at 7am-3pm show
    Image1.jpg
    Image2.gif
    Image3.jpg

    at 3pm-11pm show
    Image4.gif
    Image5.jpg
    Image6.jpg

    and at 11pm-7am show
    Image7.jpg
    Image8.jpg
    Image9.gif

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    In this slide show, for example, replace this:

    Code:
    slideshowcontent[0]=["photo1.jpg", "http://www.cnn.com", "_new"]
    slideshowcontent[1]=["photo2.jpg", "", ""]
    slideshowcontent[2]=["photo3.jpg", "http://www.google.com", ""]
    with something like:
    Code:
    var d = new Date();
    if(d.getHours() < 10){
        slideshowcontent[0]=["1.jpg", "", ""]
        slideshowcontent[1]=["2.jpg", "", ""]
        slideshowcontent[2]=["3.jpg", "", ""]
    }else if(d.getHours() < 18){
        slideshowcontent[0]=["3.jpg", "", ""]
        slideshowcontent[1]=["4.jpg", "", ""]
        slideshowcontent[2]=["5.jpg", "", ""]
    }else{
        slideshowcontent[0]=["6.jpg", "", ""]
        slideshowcontent[1]=["7.jpg", "", ""]
        slideshowcontent[2]=["8.jpg", "", ""]
    }
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

Bookmarks

Posting Permissions

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