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.
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40
  1. #16
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    Quote Originally Posted by Bonzai View Post
    the image fom me have just to be see now (Dj Lghas) from 23:00 to 24:00

    when no body is in the studio i will take a picture like this:

    http://www.inthemixradio.lu/DjOnAir/Image.png

    I think is not easy hm i'ts my first day on Java ((

    Be aware that Java and Javascript are entirely different programming languages, in spite of the confusingly similar names.

    <span id = "dj" style="font-family: Verdana, Arial, sans-serif; font-size:30px; font-weight:700; color: 'FF8000';"></span> <img src = "One.gif" id = "theImage">

    Naturally you will want to show the image apppropriate to the DJ.

    Example:-

    Code:
    if (dy >=1 && dy <=5) { // days in Javascript are 0 Sunday - 6 Saturday
    if (hh >=5 && hh <9) {show = "The Tom Joyner Morning Show";  document.getElementById("theImage").src = "Four.gif"}
    if (hh >=9 && hh <14) {show = "Carl T"; document.getElementById("theImage").src = "Two.gif"}
    }

  2. #17
    New Coder
    Join Date
    Sep 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hallo thx man but hm can you make me the insert? look end of script pls!

    Salutions to you



    <div id = "dj"></div>


    <script type = "text/javascript">
    var show = "Non Stop Music";

    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    var hh = now.getHours();

    // Tip - for testing purposes you can put here
    //dy = 6;
    //hh = 18;
    // or whatever to check that the right show appears at that day/time.



    if (dy == 1) { //Monday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Monday Shows


    if (dy == 2) { //Tuesday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Tuesday Shows


    if (dy == 3) { //Wednesday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Wednesday Shows


    if (dy == 4) { //Thursday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Thursday Shows


    if (dy == 5) { //Fryday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Fryday Shows


    if (dy == 6) { //Saturday Shows
    if (hh >=00 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Saturday Shows


    if (dy == 0) { //Sunday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Sunday Shows


    document.getElementById("dj").innerHTML = "Animateur On Air : </A><BR>" + show;
    document.getElementById("dj").style.color = 'AFAFAF';
    document.getElementById("dj").style.fontSize = "12";
    document.getElementById("dj").style.fontFamily = "Verdana";
    document.getElementById("dj").align = "left";



    </script>

  3. #18
    New Coder
    Join Date
    Sep 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hey Man
    Pls here the Finished i hope all is ok inthe sript pls re look

    here the test page http://www.inthemixradio.lu/2009


    here the script


    <div id = "dj"></div>
    <span id = "dj" style= > </A><BR><img src = "http://www.inthemixradio.lu/DjOnAir/Image.png" id = "theImage">
    <script type = "text/javascript">
    var show = "Non Stop Music";

    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    var hh = now.getHours();

    // Tip - for testing purposes you can put here
    //dy = 6;
    //hh = 18;
    // or whatever to check that the right show appears at that day/time.



    if (dy == 1) { //Monday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Monday Shows


    if (dy == 2) { //Tuesday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Tuesday Shows


    if (dy == 3) { //Wednesday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Wednesday Shows


    if (dy == 4) { //Thursday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Thursday Shows


    if (dy == 5) { //Fryday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}

    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Fryday Shows


    if (dy == 6) { //Saturday Shows
    if (hh >=00 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Olivier</A><BR><A></A><BR><A>Sendung : </A><BR><A>Late Night Show"; document.getElementById("theImage").src = "http://inthemixradio.lu//DjOnAir/Oli.png"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Saturday Shows


    if (dy == 0) { //Sunday Shows
    if (hh >=24 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    if (hh >=23 && hh <=24) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Pc Non Stop Music"}
    } //End of Sunday Shows


    document.getElementById("dj").innerHTML = "Animateur On Air : </A><BR>" + show;
    document.getElementById("dj").style.color = 'AFAFAF';
    document.getElementById("dj").style.fontSize = "12";
    document.getElementById("dj").style.fontFamily = "Verdana";
    document.getElementById("dj").align = "left";


    </script>

  4. #19
    New Coder
    Join Date
    Sep 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hi guys works powerfull but now i would to insert a 2 nd image can you help me pls thx

  5. #20
    New Coder
    Join Date
    Sep 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hi hallo i will now make the text linket look expl pls


    in red exp linked to this page
    http://www.inthemixradio.lu

    in magen linked to this page
    http://www.inthemixradio.lu/..........

    so when i click on the text new page will open the text color pls some insert color for the link!

    hope some one help me

    thx

    -------------------------------

    if (dy == 1) { //Monday Shows
    if (hh >=00 && hh <= 1) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 1 && hh <= 2) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 2 && hh <= 3) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 3 && hh <= 4) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 4 && hh <= 5) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 5 && hh <= 6) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 4 && hh <= 7) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 7 && hh <= 8) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 8 && hh <= 9) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >= 9 && hh <=10) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=10 && hh <=11) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=11 && hh <=12) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=12 && hh <=13) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=13 && hh <=14) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=14 && hh <=15) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=15 && hh <=16) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=16 && hh <=17) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=17 && hh <=18) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=18 && hh <=19) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=19 && hh <=20) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=20 && hh <=21) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=21 && hh <=22) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=22 && hh <=23) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    if (hh >=23 && hh <=00) {show ="Pc</A><BR><A></A><BR><A>Sendung : </A><BR><A>Non Stop Music"}
    } //End of Monday Shows

  6. #21
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    When posting here please help us to help you by following the posting guidelines and wrapping your code in CODE tags. This means use the octothorpe or # button on the toolbar which will insert the tags. You can (and should) edit your previous post.

    Finally, I am afraid that your English is too fractured for me to understand you. "hi hallo i will now make the text linket look expl pls" Textspeak is particularly inappropriate when your first langauge is not English.

    The short answer is to use CSS to control the style of the display.
    Last edited by Philip M; 04-24-2010 at 07:56 AM.

  7. #22
    New Coder
    Join Date
    May 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know this is an old thread but I recently used this code and it works wounders, a little question though, is there anyway i can make it refresh ever so often, as for the moment it only changes when the page reloads ? thanks

  8. #23
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,026
    Thanks
    36
    Thanked 494 Times in 488 Posts

    Question

    Quote Originally Posted by xuraco View Post
    I know this is an old thread but I recently used this code and it works wounders, a little question though, is there anyway i can make it refresh ever so often, as for the moment it only changes when the page reloads ? thanks
    What is the "refresh ever so often" interval?
    Hourly, Minutes, Seconds? Milliseconds would probably be over kill!

  9. #24
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is my schedule I am working on but I would like to make all shows hyperlink to a new page how do I add this.


    <div id="npdj"></div>
    <script type = "text/javascript">
    var show = "No show scheduled at present";
    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    var hh = now.getHours();


    // Tip - for testing purposes you can put here
    //dy = 0;
    //hh = 8;
    // or whatever to check that the right show appears at that day/time.

    if (dy >= 0) { // days in Javascript are 0 Sun
    if (hh >= 00 && hh <= 8) { }
    if (hh >= 8 && hh <= 10) { show = "Sunday Breakfast"; document.getElementById("theImage").src = "images/npimg.png"; }
    if (hh >= 10 && hh <= 12) { show = "Sunday Brunch" }
    if (hh >= 12 && hh <= 15) { show = " Sunday Afternoons" }
    if (hh >= 15 && hh <= 22) { }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 1) { // days in Javascript are 1 Mon
    if (hh >= 00 && hh <= 7) { }
    if (hh >= 7 && hh <= 10) { show = "Weekday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Weekday Mornings" }
    if (hh >= 12 && hh <= 15) { show = " Weekday Afternoons" }
    if (hh >= 15 && hh <= 18) {show = "Drive Time"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 18 && hh <= 22) { }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 2) { // days in Javascript are 2 Tues
    if (hh >= 00 && hh <= 7) { }
    if (hh >= 7 && hh <= 10) { show = "Weekday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Weekday Mornings" }
    if (hh >= 12 && hh <= 15) { show = " Weekday Afternoons" }
    if (hh >= 15 && hh <= 18) { show = "Drive Time"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 18 && hh <= 22) { }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 3) { // days in Javascript are 3 Wed
    if (hh >= 00 && hh <= 7) { }
    if (hh >= 7 && hh <= 10) { show = "Weekday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Weekday Mornings" }
    if (hh >= 12 && hh <= 15) { show = " Weekday Afternoons" }
    if (hh >= 15 && hh <= 18) { show = "Drive Time"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 18 && hh <= 22) { }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 4) { // days in Javascript are 4 Thurs
    if (hh >= 00 && hh <= 7) { }
    if (hh >= 7 && hh <= 10) { show = "Weekday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Weekday Mornings" }
    if (hh >= 12 && hh <= 15) { show = " Weekday Afternoons" }
    if (hh >= 15 && hh <= 18) { show = "Drive Time"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 18 && hh <= 22) { }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 5) { // days in Javascript are 5 Fri
    if (hh >= 00 && hh <= 7) { }
    if (hh >= 7 && hh <= 10) { show = "Weekday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Weekday Mornings" }
    if (hh >= 12 && hh <= 15) { show = " Weekday Afternoons" }
    if (hh >= 15 && hh <= 18) { show = "Drive Time"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 18 && hh <= 20) { }
    if (hh >= 20 && hh <= 22) { show = "Friday Night Fever" }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }
    }

    if (dy >= 6) { // days in Javascript are 6 Sat
    if (hh >= 00 && hh <= 8) { }
    if (hh >= 8 && hh <= 10) { show = "Saturday Breakfast"; document.getElementById("theImage").src = "images/npimg.png" }
    if (hh >= 10 && hh <= 12) { show = "Saturday Brunch" }
    if (hh >= 12 && hh <= 15) { show = "Saturday Afternoons" }
    if (hh >= 15 && hh <= 20) { }
    if (hh >= 20 && hh <= 22) { show = "Saturday Night Fever" }
    if (hh >= 22 && hh <= 00) { show = "The Late Show" }

    }

    document.getElementById("npdj").innerHTML = "On Air: " + show;
    </script>

  10. #25
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    Quote Originally Posted by SeanUK View Post
    Here is my schedule I am working on but I would like to make all shows hyperlink to a new page how do I add this.

    In the usual way. Example:-

    Code:
    if (hh >= 8 && hh <= 10) { show = "<a href = 'http://www.google.com'>Sunday Breakfast</a>" }
    if (dy >= 0) { // days in Javascript are 0 Sun
    should be
    if (dy == 0) { // days in Javascript are 0 Sun


    “Pessimist: One who, when he has the choice of two evils, chooses both.”
    Oscar Wilde (Irish Poet, Novelist, Dramatist and Critic, 1854-1900)

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  11. #26
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks I was trying this way
    if (hh >= 8 && hh <= 10) { show = "<a href = "schedule.html">Sunday Breakfast</a>"; document.getElementById("theImage").src = "images/npimg.png" }

  12. #27
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    Quote Originally Posted by SeanUK View Post
    thanks I was trying this way
    if (hh >= 8 && hh <= 10) { show = "<a href = "schedule.html">Sunday Breakfast</a>"; document.getElementById("theImage").src = "images/npimg.png" }
    show = "<a href = "schedule.html">Sunday Breakfast</a>";

    You have double quotes within double quotes. You should use single quotes for the url.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  13. #28
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,026
    Thanks
    36
    Thanked 494 Times in 488 Posts

    Lightbulb

    Based upon your code of post #24, and need for hourly change notifications,
    you could eliminate a lot of duplicated logic with a change to something like this...

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <meta charset="utf-8" />
    <title> Radio Times </title>
    <script type="text/javascript">
    
    var showTimes = [         // ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],  // for each hour 0...23
     ['','','','','','',''],  // hour 0
     ['','','','','','',''],  // hour 1
     ['','','','','','',''],  // hour 2
     ['','','','','','',''],  // hour 3
     ['','','','','','',''],  // hour 4
     ['','','','','','',''],  // hour 5
     ['','','','','','',''],  // hour 6
     ['',                    'Weekday Breakfast', 'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  ''],                    // hour 7
     ['Sunday Breakfast',    'Weekday Breakfast', 'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  'Saturday Breakfast'],  // hour 8
     ['Sunday Breakfast',    'Weekday Breakfast', 'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  'Weekday Breakfast',  'Saturday Breakfast'],  // hour 9
     ['Sunday Brunch',       'Weekday Mornings',  'Weekday Mornings',   'Weekday Mornings',   'Weekday Mornings',   'Weekday Mornings',   'Saturday Brunch'],     // hour 10
     ['Sunday Brunch',       'Weekday Mornings',  'Weekday Mornings',   'Weekday Mornings',   'Weekday Mornings',   'Weekday Mornings',   'Saturday Brunch'],     // hour 11
     ['Sunday Afternoon',    'Weekday Afternoons','Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Saturday Afternoon'],  // hour 12
     ['Sunday Afternoon',    'Weekday Afternoons','Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Saturday Afternoon'],  // hour 13
     ['Sunday Afternoon',    'Weekday Afternoons','Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Weekday Afternoons', 'Saturday Afternoon'],  // hour 14
     ['',                    'Drive Time',        'Drive Time',         'Drive Time',         'Drive Time',         'Drive Time',         ''],                    // hour 15
     ['',                    'Drive Time',        'Drive Time',         'Drive Time',         'Drive Time',         'Drive Time',         ''],                    // hour 16
     ['',                    'Drive Time',        'Drive Time',         'Drive Time',         'Drive Time',         'Drive Time',         ''],                    // hour 17
     ['',                    'Supper Break',      'Supper Break',       'Supper Break',       'Supper Break',       'Supper Break',       ''],                    // hour 18
     ['','','','','','',''],  // hour 19  // Evening Bluegrass
     ['','','','','','',''],  // hour 20  // Evening Dowop
     ['','','','','','',''],  // hour 21  // Evening Jazz
     ['The Late Show',       'The Late Show',     'The Late Show',      'The Late Show',      'The Late Show',      'The Late Show',      'The Late Show'],       // hour 22
     ['The Late Show',       'The Late Show',     'The Late Show',      'The Late Show',      'The Late Show',      'The Late Show',      'The Late Show']        // hour 23
    ];
    
    var showTimeLinks = [];
        showTimeLinks['Weekday Breakfast'] = '<a href="wbSchedule.html">';  // each link needs to be defined as an HTML file
        showTimeLinks['Weekday Mornings'] = '<a href="wmSchedule.html">';
        showTimeLinks['Weekday Afternoons'] = '<a href="waSchedule.html">';
        showTimeLinks['Sunday Breakfast'] = '<a href="subSchedule.html">';
        showTimeLinks['Sunday Brunch'] = '<a href="subrSchedule.html">';
        showTimeLinks['Saturday Breakfast'] = '<a href="sabSchedule.html">';
        showTimeLinks['Saturday Brunch'] = '<a href="sabrSchedule.html">';
        showTimeLinks['Drive Time'] = '<a href="dtSchedule.html">';
        showTimeLinks['The Late Show'] = '<a href="lsSchedule.html">';
    
    // similar logic as above to set any image links
    //  showTimeLinks['Weekday Breakfast'] = '<a href="wbSchedule.html"><img src="wbImage.jpg>';  // each link needs to be defined as an HTML file
    
    </script>
    <style type="text/css">
    
    </style>
    </head>
    <body>
    <div id="npdj" />
    <script type="text/javascript">
    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    var hh = now.getHours();
    
    // Tip - for testing purposes you can put here
    // dy = 3;
    // hh = 15;
    // or whatever to check that the right show appears at that day/time.
    
    var tmp = showTimes[hh][dy]
    var show = "On Air: "+showTimeLinks[tmp]+tmp+"</a>";
    if (showTimes[hh][dy] == '') { show = "<a href='schedule.html'>On Air</a>: No show scheduled at present"; }
    
    document.getElementById("npdj").innerHTML = show;
    </script>
    
    </body>
    </html>
    Images could be easily added as shown in sample change above.

  14. #29
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts
    Quote Originally Posted by jmrker View Post
    Based upon your code of post #24, and need for hourly change notifications,
    you could eliminate a lot of duplicated logic with a change to something like this...
    Hmm. A lot harder to edit, IMO, and excludes the possibility of sometimes changing the program at other the full hour. Mine is easily adjusted with hours as a decimal, say 9.5 for 9:30. I prefer clarity/simplicity to efficiency/elegance! And single quotes ['','','','','','',''], is frought with risk of mistyping " instead of ''. But à chacun son goût as the Germans would say.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  15. #30
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,026
    Thanks
    36
    Thanked 494 Times in 488 Posts

    Arrow

    Quote Originally Posted by Philip M View Post
    Hmm. A lot harder to edit, IMO, and excludes the possibility of sometimes changing the program at other the full hour. Mine is easily adjusted with hours as a decimal, say 9.5 for 9:30. I prefer clarity/simplicity to efficiency/elegance! And single quotes ['','','','','','',''], is frought with risk of mistyping " instead of ''. But à chacun son goût as the Germans would say.
    Never said it was better, just an alternative solution.
    This post has been around for what seems to be forever and people still cannot seem to get the logic right.
    For example:
    Code:
    if (hh >= 12 && hh <= 15) ...
    // followed by
    if (hh >= 15 && hh <= 22) ...
    The array set-up bypasses all this redundant code and
    does not use if logic at the top of the hour where display would be set twice.
    True, the array is setup for hourly changes only, but that was the OP's requirements,
    but it does only need to be created correctly once, so I don't know the editing would be a problem.

    Plus I have no idea what the German's would say.


 
Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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