# OnChatUserDisconnect Event Fires when a user disconnects. Syntax
    SiteCafe.Server.Chat.OnChatUserDisconnect = handler
Parameters
sessionIndex | Long value that contains the user's session index.
Remarks The object that caused the event can be referenced in the event function using "this". Examples The following example displays an alert window when a user disconnects.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    SiteCafe.Server.Chat.OnChatUserDisconnect = OnChatUserDisconnect;
    function OnChatUserDisconnect(sessionIndex)
    {
       alert("User: " + sessionIndex);
    }
    </SCRIPT>
Applies to SiteKiosk v6.2 (and later versions). Back to top