Help Desk Software
Support Center > Knowledge Base> Article: Live chat online/offline detection via JavaScript

Live chat online/offline detection via JavaScript

Article ID: 4823 Email Print

Question
I would like to do additional programming on my website but i need to detect whether there are operators online under my account. Is it possible to determine?

Answer

You would need to check the value of bLHNOnline JavaScript variable.
The variable will be initialized by LiveHelpNow code on your site so you would need to check bLHNOnline variable's value after LiveHelpNow code installation on your page or in "onload" event of your page's body.

<script>
function LHN_button_onLoad(){
if (bLHNOnline == 0)
    {
     //All operators are offline
    }
else
    {

     //There are operators online
     }}

</script>

 


Related articles

Article Details
Views:3065 Created on:Jan 04, 2011

Poor Outstanding
Enter the numbers as shown in the image on the left