Pomoc oko ove skripte "ON AIR"
Pozdrav!
Potrebna mi je pomoc oko ove skripte, koja prikazuje sta se trenutno pusta na radio stanici, DJ, itd...meni je potrebno nesto slicno, ali kada iskopiram skriptu u zeljeni div, taj div i dalje ne prikazuje sadrzaj i nece uporno da proradi...moze li neka pomoc?
Skripta je sledeca:
<body onload = "display()">
<div id = "dj" >
<script type = "text/javascript">
function display() {
var show = "No show scheduled at present";
var GMToffset = -5; // Your current GMT offset, whether Standard or Daylight
var now = new Date();
var dy = now.getDay(); // day of week 0-6
now.setHours(GMToffset + now.getHours() + now.getTimezoneOffset() / 60);
var hh = now.getHours();
var mn = now.getMinutes();
hh = hh + (mn/60); // minutes expressed as fractions of an hour
// The GMT offset ensures that every visitor, regardless of their timezone, will see the schedule
// that is appropriate for the site owner's local time.
// Tip - for testing purposes you can put here
//dy = 5;
//hh = 9.25;
// or whatever to check that the right show appears at that day/time.
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"}
}
if (dy >=1 && dy <=5) {
if (hh >=14 && hh <=18) {show ="Tommy C"}
}
if (dy >= 1 && dy <=4) {
if (hh >=18 && hh <23) {show = "Keith Sweat"}
}
if (dy == 5) {
if (hh >=18 && hh <=23) {show = "G.L.Haywood (House Party)"} //goes on to midnight
}
if (dy == 6) { // Saturday Note the two = signs to mean equals
if (hh >= 6 && hh <9) {show = "The Tom Joyner Morning Show: Right Back At Cha!" }
if (hh >= 9 && hh <14) {show = "Carl T"}
if (hh >=14 && hh <20) {show = "George Fisher"}
if (hh >=20 && hh <22) {show = "Chief Chris Omigee & Momanite Nurse"}
if (hh >=22 && hh <24) {show = "House Party"}
} //End of Saturday Shows
if (dy == 0) { //Sunday Shows
if (hh >= 5 && hh <10) {show = "Porshe Evans (Gospel)"}
if (hh >=10 && hh <12) {show = "The Cravins Brothers Zydeco and Info Show with Charles & Donald Cravins"}
if (hh >=12 && hh <17) {show = "George Fisher"}
if (hh >=17 && hh <21) {show = "Dr. Boogie Live"}
} // End of Sunday Shows
var a = "On air now:- " + show + " \u00A0 \u00A0 \u00A0 \u00A0 "; // spaces must be separted by Unicode spaces to prevent collapse
document.getElementById("dj").innerHTML = a;
setTimeout("display()", 60000); // update every 60 seconds
}
</script>
</div>
|