link of the hour javascript---anyone got one?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • latinasojourn
    Confirmed User
    • Oct 2003
    • 3191

    #1

    link of the hour javascript---anyone got one?

    i want to rotate through a list of URLS and have it change every hour.

    anyone know an off-the-shelf javascript that does this.

    with a description such as, click here for featured model of the hour.

    thanks.
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #2
    heres a simple php method

    http://clarksco.com/blog/?p=10%20Quote
    hatisblack at yahoo.com

    Comment

    • latinasojourn
      Confirmed User
      • Oct 2003
      • 3191

      #3
      Originally posted by SmokeyTheBear
      heres a simple php method

      http://clarksco.com/blog/?p=10%20Quote
      looks good smokey, but i need javascript version.

      that's the idea i'm looking for though. thanks!

      Comment

      • mikeyddddd
        Viva la vulva!
        • Mar 2003
        • 16557

        #4
        Something like this:

        var now = new Date(); var currentDate = now.getHours();
        var hour_var = new Array(
        "http://www.your-domain.com/url-1",
        "http://www.your-domain.com/url-2",
        "http://www.your-domain.com/url-3",
        "http://www.your-domain.com/url-4",
        "http://www.your-domain.com/url-5",
        "http://www.your-domain.com/url-6",
        "http://www.your-domain.com/url-7",
        "http://www.your-domain.com/url-8",
        "http://www.your-domain.com/url-9",
        "http://www.your-domain.com/url-10",
        "http://www.your-domain.com/url-11",
        "http://www.your-domain.com/url-12",
        "http://www.your-domain.com/url-13",
        "http://www.your-domain.com/url-14",
        "http://www.your-domain.com/url-15",
        "http://www.your-domain.com/url-16",
        "http://www.your-domain.com/url-17",
        "http://www.your-domain.com/url-18",
        "http://www.your-domain.com/url-19",
        "http://www.your-domain.com/url-20",
        "http://www.your-domain.com/url-21",
        "http://www.your-domain.com/url-22",
        "http://www.your-domain.com/url-23",
        "http://www.your-domain.com/url-24");
        document.write('<a href="' + hour_var[currentDate] + '">click here for featured model of the hour</a>');

        Comment

        Working...