AnsweredAssumed Answered

Call jivelive.jsp on Saturday only

Question asked by doubz on May 2, 2015
Latest reply on May 6, 2015 by doubz

I'm using FastPath for support reasons. I only want the "Live Support" picture to show on Monday - Friday (preferably between 9am and 6 pm).

 

Without the date/time logic, it shows. With it, nothing shows.

 

Here is what I have so far:

 

<script>
// http://stackoverflow.com/questions/4822852/how-to-get-the-day-of-week-and-the-month-of-the-year
var now = new Date();
if (now.getDay() === 6) {
call="http://URL:7070/webchat/jivelive.jsp"
showChatButton('support@workgroup.URL');
}
</script>

 

The Working code (without date if statement):

 

<!-- To enable fastpath Live Support photo -->
<script language="JavaScript" type="text/javascript" src="http://URL:7070/webchat/jivelive.jsp"></script>
<script>showChatButton('support@workgroup.URL');</script>

 

Any ideas?

 

Thanks everyone.

Outcomes