I need to disable the live chat option when all agents are offline.

I used liveagent.showWhenOnline and liveagent.showWhenOffline methods in the controller.

liveagent.showWhenOnline('button_id', document.getElementById('liveagent_button_online_button_id'));

liveagent.showWhenOffline('button_id', document.getElementById('liveagent_button_offline_button_id'));

liveagent_button_online_button_id and liveagent_button_offline_button_id are referring to the element ids of corresponding div.

The functionality is working fine. But need to refresh the page and it takes some time to display/disable the button.

What can be the reason for this delay in response time?

Thank You!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.