Is it possible to use javascript to show a "chat now" button on one of our webpages during our hours of operation: Mon - Fri 8:00 AM to 5:00 PM Central time. And; hide the "chat now" button outside of our hours of operation ?

Any help would be greatly appreciated.

Thanks,

John

var bd = new Date();
if ((bd.getDay() > 0 && bd.getDay() < 6) && (bd.getHours() >= 8 && bd.getHours() <= 17)) {
  //show
} else {
 // hide
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.