onOpen ( bool byVisitor )

The event of opening/advancement of the "Slider" and "Pop-up" chat widgets.

The byVisitor parameter contains information on whether the window was dragged out at the visitor's initiative or automatically. It accepts the values true (by the visitor) and false (automatically)

If you need to prohibit the opening of the chat widget, your handler should return the false value or other value that can be brought down to the logical type. If the handler returns an undefined value (undefined), the system will consider that as permission for opening the widget. Thus, if your handler lacks the "return" element, it will not cause problems for normal functionality.

To cause the widget opening in software, use the nsc_Visitor.open() method
To perform actions after opening the chat widget (after finally assuming the "open" status), use the onAfterOpen() event


  1. Using jQuery
    $(document).on("netroxopen", function(event, byVisitor) {
            // Your handler code
  2. Using the nsc_API object
    nsc_API = { /* ... */ };
    nsc_API.onOpen = function(byVisitor) {
            // Your handler code

All rights reserved. Copyright © 2021 Netrox SC
Host CMS