Jump to content

Scrolling through schedule with javascript


bmwaldrop
 Share

Recommended Posts

OK, so I work at a TV station.The schedule lists the programs that will be airing that day. Right now, the schedule is defaulted to 1pm. So if someone comes to our site at 5pm, it's going to show what's airing at 1pm. I'd like to change this to where when someone comes to our site, it show's what's airing at that moment (5pm programming if it's 515pm, 6pm programming if it's 605pm and so on). Right now, the scheduler already switches to the correct day and pulls the correct programming, we just need it to bring up the correct time.I talked to the developer who created the scheduler and he said this can be done through javascript. Being new to javascript, I'm needing some help as I don't know where to get started. Here's the script just in case it's needed. Thanks

<script type="text/javascript" src="/rotatorjs/flashobject.js"></script><div id="flashcontent"><a href="/Schedule/"><img border="0" src="/images/flash_viewschedule.gif" alt="" /></a><a href="http://www.macromedia.com/go/getflashplayer"><img border="0" src="/images/flash_getflash.gif" alt="" /></a></div><script type="text/javascript">var fo = newFlashObject("/schedule.swf?currentTime=Nov 29, 2006 01:20:27 PM", "homeflash", "595","240", "7", "#FFFFFF");fo.addParam("wmode","transparent");fo.write("flashcontent");</script>

Link to comment
Share on other sites

you can use the date object to get all information about the current date and time.http://www.w3schools.com/jsref/jsref_obj_date.aspand format it to fit your needs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...