html links active at certain times only

I have a list of classes and I want the "view" button link to only be active at certain times during the day for each class.  For non-active links, I need an alternate button that is not live.  The class time is listed in the table view and I would like to use that as the variable for activating the links.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
You have a few things to consider.  If you need some background information on how these three technologies interact around date / time, this article can help.

Some things we would need to know to give you really good answers...

Are the times to be expressed in the time zone of the client browser or in the time zone of the server(s)?

Would the "view" button go from active to inactive after a client HTTP request?  Or would the view button state be determinable on the server?

What would happen if a class were to be active at 12:00 noon, but I opened my browser window at 11:59?  Would the button be inactive?  What should happen if 12:00 noon passed but I had not refreshed my browser?

Some good ideas about styling will be available in the CSS for Twitter Bootstrap.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bamaby39Author Commented:
Thanks Ray.  
The times need to be client browser since we have clients in multiple time zones.  The view button would be active for an hour or hour and a half at most and should be unaffected by user clicks.  Background:  All the view button does is link to a live streaming video page for a fitness class.  So there will be about 7 classes listed with one active link that moves down the page as time passes.  
Good point on refresh so it would be ideal if the page auto refreshed when the view button changed.
Vimal DMSenior Software EngineerCommented:

Am not very clear about your requirement may be the below script can help you,

function ShowHide()
  var d = new Date();
  var dayofweek = d.getDay();
  var hourofday = d.getHours();
  if ((dayofweek === 0 && hourofday <= 7) || dayofweek === 6 || (dayofweek === 5 && hourofday >= 16))
    $("#hello a").click(function(e){
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.