PDA

View Full Version : Help on air script



ultra89
07-02-2017, 06:01 PM
hello i have a script that allows the picture to change whenever
a different dj is on the air?

please can someone help


<form id="nowPlaying"> <fieldset id="everyBorder"> <legend id="everyLegend"><h1>Now Playing</h1></legend> <div id="NPT"> <div id="NPC"> <!-- This images changes depending who is on air --> <a href="http://149.56.234.138:8157/index.html?sid=1" target="_blank"> <img id="djOnAir" src="onairinfo/images/logo.gif" alt="Now Playing!"></a> </div> <div id="NPC"> <!-- BEGINS: SHOUTCASTWIDGETS.COM CURRENTLY PLAYING--> <iframe id="currently_playing" src="http://32oneweb.com/bio.php?username=bukqghkz&amp; buttons_background=666666&amp; buttons_text=FFF&amp; buttons_background_hover=000000&amp; buttons_background_active=FF0000&amp; text=FFFFFF&amp; background=000000&amp; link_color=EEEEEE&amp; image=round&amp;float=right&amp;size=1&amp;header_text=FF0000&amp; header_size=2&amp;border=dashed&amp;stage=444444&amp;amazon=&amp;s evendigital=&amp; facebook=yes&amp;twitter=yes&amp;server=yes&amp;listeners=yes&amp; language=yes&amp;font=georgia&amp;ads=bottom&amp;ad_color=FFFF FF&amp;sell_ads=yes" name="currently_playing" scrolling="no"></iframe> </div> </div></fieldset></form><br>

this is the script, i don't know if i have done anything wrong or not

robert4u
07-02-2017, 07:39 PM
What issue are you having, I ran the script its iframe and seem to work fine.

shoutcaststreaming
07-03-2017, 01:58 AM
Dang, really hard to read the script. Next time please use a hex 0A and a hex 0D between lines.

djaubs89
07-16-2017, 11:48 AM
mine dont even change to my picture

djaubs89
07-16-2017, 11:49 AM
this code dont do anything for me




</style>


<script type="text/javascript">


/* NOT CURRENTLY USED
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();


var GMT = new Date().getTimezoneOffset();
var offsetGMT = -5 * new Date().getTimezoneOffset()/60;
*/


// Sun=0 1 2 3 4 5 Sat=6
var DayOfWeek = new Array('Weekend','Monday','Tuesday','Wednesday','Th ursday','Friday','Weekend');


var NoShow = 'No Show Scheduled<br />for urbanradio';
var DH = new Array (7);
for (d=0; d<7; d++) {
DH[d] = new Array (24);
for (h=0; h<24; h++) { DH[d][h] = ''; }
}


DH[1][09] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][10] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][11] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][12] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][13] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][14] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][15] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][16] = '<img src="/new/images/jukebox.gif" width=100 height=80 border=1>';
DH[1][17] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[1][18] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[1][19] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[1][20] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[1][21] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';


DH[2][09] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[2][10] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[2][11] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[2][12] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][13] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][14] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][15] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][16] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][17] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][18] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][19] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][20] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[2][21] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';


DH[3][09] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[3][10] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[3][11] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[3][12] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][13] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][14] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][15] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][16] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][17] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][18] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][19] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][20] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[3][21] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';


DH[4][09] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[4][10] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[4][11] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[4][12] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][13] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][14] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][15] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][16] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][17] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][18] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][19] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][20] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[4][21] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';


DH[5][09] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[5][10] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[5][11] = '<b>ON AIR NOW<B> Jukebox 1am to 12pm';
DH[5][12] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][13] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][14] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][15] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][16] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][17] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][18] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][19] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';
DH[5][20] = '<b>ON AIR NOW<b> DJ Strawbs All Request Show 8pm to 6pm';
DH[5][21] = '<b>ON AIR NOW<b> Jukebox 1am to 12pm';




// Add more when schedule is known. Note: there may be better ways to do this when information is known.




function OnNow() {
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();
// alert(dayofweek+':'+hourofday+'<br />'+DH[dayofweek][hourofday]);
var showOn = DH[dayofweek][hourofday];
if (showOn == '') { showOn = thedate+'\n\nNo Show Scheduled'; }
alert(showOn);
}


function NowON() {
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();
var showOn = DH[dayofweek][hourofday];
if (showOn == '') { showOn = thedate+'<p />No Show Scheduled'; }
document.getElementById('NowOn').innerHTML = showOn;
}
</script>
<strong></strong>
</head>
<BODY onLoad="NowON()">
<!-- Unhide this if table display desired
<script type="text/javascript">
document.write(TableStationSchedule())
</script>
-->
<script type="text/javascript">
document.write(NowON());
</script>
<img src="/new/images/jukebox.gif" width=100 height=80 border=1>'
</body></style>


<script type="text/javascript">


/* NOT CURRENTLY USED
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();


var GMT = new Date().getTimezoneOffset();
var offsetGMT = -5 * new Date().getTimezoneOffset()/60;
*/


// Sun=0 1 2 3 4 5 Sat=6
var DayOfWeek = new Array('Weekend','Monday','Tuesday','Wednesday','Th ursday','Friday','Weekend');


var NoShow = 'No Show Scheduled<br />for KSWH';
var DH = new Array (7);
for (d=0; d<7; d++) {
DH[d] = new Array (24);
for (h=0; h<24; h++) { DH[d][h] = ''; }
}


DH[1][09] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[1][10] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[1][11] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[1][12] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[1][13] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[1][14] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[1][15] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[1][16] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[1][17] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[1][18] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[1][19] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[1][20] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';
DH[1][21] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';


DH[2][09] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[2][10] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[2][11] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[2][12] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[2][13] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[2][14] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[2][15] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[2][16] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[2][17] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[2][18] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[2][19] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[2][20] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';
DH[2][21] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';


DH[3][09] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[3][10] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[3][11] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[3][12] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[3][13] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[3][14] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[3][15] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[3][16] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[3][17] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[3][18] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[3][19] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[3][20] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';
DH[3][21] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';


DH[4][09] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[4][10] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[4][11] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[4][12] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[4][13] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[4][14] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[4][15] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[4][16] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[4][17] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[4][18] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[4][19] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[4][20] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';
DH[4][21] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';


DH[5][09] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[5][10] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[5][11] = '<b>ON AIR NOW<B> Dean sharp breakfast show 9am to 12pm';
DH[5][12] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[5][13] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[5][14] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[5][15] = '<b>ON AIR NOW<b> cheryle dale 12pm to 4pm';
DH[5][16] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[5][17] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[5][18] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[5][19] = '<b>ON AIR NOW<b> Jessie brooke evening show 4pm to 8pm';
DH[5][20] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';
DH[5][21] = '<b>ON AIR NOW<b> Zenith classic rock 8pm to 10pm';




// Add more when schedule is known. Note: there may be better ways to do this when information is known.




function OnNow() {
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();
// alert(dayofweek+':'+hourofday+'<br />'+DH[dayofweek][hourofday]);
var showOn = DH[dayofweek][hourofday];
if (showOn == '') { showOn = thedate+'\n\nNo Show Scheduled'; }
alert(showOn);
}


function NowON() {
var thedate = new Date();
var dayofweek = thedate.getDay();
var hourofday = thedate.getHours();
var showOn = DH[dayofweek][hourofday];
if (showOn == '') { showOn = thedate+'<p />No Show Scheduled'; }
document.getElementById('NowOn').innerHTML = showOn;
}
</script>
<strong></strong>
</head>
<BODY onLoad="NowON()">
<!-- Unhide this if table display desired
<script type="text/javascript">
document.write(TableStationSchedule())
</script>
-->
<script type="text/javascript">
document.write(NowON());
</script>
<div id='NowOn' onClick="NowON()">Urban8 ON AIR NOW</div>
</body>

James
07-16-2017, 11:01 PM
djaubs89, how does your code relate to the original posters code/topic? Please keep your discussions in ONE thread rather than multiple threads and private messages. We will respond to you in time if you give us as much detail as possible.

Thread locked.