Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: ON AIR Radio Display Script

  1. #11
    Join Date
    May 2007
    Location
    Canada
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by reddiestorm View Post
    hmmm...I was actually close then. I've checked everything and I'm still not getting results. Here are the links finally:

    website: http://stuwww.hsu.edu/kswh/2008/index.htm
    javascript: http://stuwww.hsu.edu/kswh/2008/liveschedule3.html
    I checked the 2nd page "http://stuwww.hsu.edu/kswh/2008/liveschedule3.html" and below is part of the code you have.
    HTML Code:
    <BODY onLoad="getSchedule(day)">
    <!-- Unhide this if table display desired
    <script type="text/javascript">
    document.write(TableStationSchedule())
    </script>
    -->
    <script type="text/javascript">
    document.write(getSchedule(day));
    </script>
    <div id='sch' onClick="getSchedule(day)">Click For Now On KSWH</div>
    </body>
    Just trying to help you out here but I assume you are a little new to Javascript. You may need to read some basic tutorials.

    <BODY onLoad="getSchedule(day)">
    <div id='sch' onClick="getSchedule(day)">
    document.write(getSchedule(day)

    You are calling the getSchedule function incorrectly. When you are calling a function, you need to pass actual value in the parameters. In the above two lines, "day" is not an actual value that you are passing in. You also don't have a variable named "day" in the scope that contains the expected value. It will only work if you pass the expected values which is integers 1 to 5, because that's what the getSchedule function is expecting.

    I don't know whether you want to have the schedule show up when the body loads or what, but the following should work.

    HTML Code:
    <script type=text/javascript>
    function load()
    {
    var date = new Date() ;
    var today = date.getDay() ;
    var schedule = getSchedule(today) ;
    document.getElementById("sch").innerHTML = schedule ;
    }
    </script>
    Now, you can call the load function like this to have this show up automatically when your body loads

    HTML Code:
    <BODY onLoad="load()">
    <div id='sch'></div>
    </body>

  2. #12
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am too using this script and i would like it to just appear on my page who is on air instead of having to click on it to display it.

    How would i do that?

  3. #13
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry to Dig up an old thread..

    This script works perfect for what i need it for.. however in IE i get the following error (see attached).. it works fine in Chrome and Firefox.. just getting that little annoying error in the status bar in IE and would love to know how to fix it :-)

    Thanks all
    Mack

  4. #14
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here is the error....


    Code:
    Message: 'document.getElementById(...)' is null or not an object
    Line: 54
    Char: 1
    Code: 0

    thanks

  5. #15
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Guys and Girls love the script but i have one question when I have no show on the script it shows

    Fri Jun 24 2011 13:33:15 GMT-0700 (PST)

    Non STOP OutRage

    __

    I like that but i don't wont the date and time there all i wont is the Non STOP OutRage text
    how can I take the time date out ??


    Thanks for your help

Bookmarks

Posting Permissions

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