onVisitorInfoChange ( data )

The event of modification of visitor data input fields.

The data object is passed as an argument, containing the following properties:

PropertyTypeDescription
field string This property shows whose input field value has changed in particular. It may contain one of the following values:
  • nick -- visitor name input field value changed
  • phone -- phone input field value changed
  • email -- email input field value changed
  • custom1 -- additional input field 1 value changed
  • custom2 -- additional input field 2 value changed
  • custom3 -- additional input field 3 value changed
oldValue string Old value of the changed input field
newValue string New value of the changed input field

Examples

  1. Using jQuery
    $(document).on("netroxvisitorinfochange", function(event, data) {
        // For instance, display a query message
        alert('You have changed a field value "' + data.field 
            + '" c "' + data.oldValue + '" ?? "' + data.newValue);
    });       
  2. Using the nsc_API object
    nsc_API = { /* ... */ };
    
    nsc_API.onVisitorInfoChange = function(data) {
        // For instance, display a query message
        alert('You have changed a field value"' + data.field 
            + '" c "' + data.oldValue + '" ?? "' + data.newValue);
    };        

All rights reserved. Copyright © 2017 Netrox SC
Host CMS