onOnline ( data )

Activates when the chat widget goes online. In other words, it activates when there are operators available to chat.

The data object is sent as a parameter, containing the following properties:

real boolean true if that is an actual switch to the "Online" status and false if that is simply a repeat initialization of the online window (for instance, upon switching to a new page) without status change

Most often this event is used to send some information from the site into the system upon chat window initialization, using the setParameter() method. For instance, this could be the case with the data identifying the visitor as your customer (internal ID or may event their name). If you use the event for intercepting the window initialization on the page, remember that the window can also be initialized with the "offline" status. To handle initialization with the offline status, use the onOffline() event. To handle initialization regardless of the status use the onInit() event.


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

All rights reserved. Copyright © 2021 Netrox SC
Host CMS