I want to have a javascript which displays images on a page on on particular day, in this instance, Monday. The code below show’s what i’ve done to try and reach this but i’ve been unsuccesful in getting it right. The actual code works but in the 6th line specifying the getDay as you can see i’ve selected 1 for monday but it still displays the image on other days when i want it only on monday! ?
[B]day = new Date();
hours = day.getUTCHours()*60;
minutes = day.getUTCMinutes();
time = hours + minutes;
[COLOR=”Blue”]if (day.getDay()==1);
if (time < 0) {time = time + 1440}
if (time > 1440) {time = time – 1440}
if(time<1140) { // 7:00 pm
document.write(”)
} else if(time<1260) { //9:00 pm
document.write(‘<img src=”on-air-now_10521.png” height=”21″ width=”105″ border=”0″>’)
} else if(time<1440) { // 12:00 am
document.write(”)
}