54a317fac3f16ff506f389bd43b050bdd97b0f90e2edfdb52a97b7c406d45900

Source Code:

var NaviApiSearchSelect = function () {};

/**
 * show selected service/floor name
 */
NaviApiSearchSelect.changedSelect = function () {
  var index = NaviApiSearchSelect.box.selectedIndex;
  var selectedText = NaviApiSearchSelect.box.options[index].text;
  NaviApiSearchSelect.display.innerText = selectedText;
};

/**
 * definition
 */
NaviApiSearchSelect.parent = document.getElementById('select-parent');
NaviApiSearchSelect.box = document.getElementById('select-box');
NaviApiSearchSelect.display = document.getElementById('select-display');

/**
 * add event listeners
 */
NaviApiSearchSelect.parent.addEventListener('change', NaviApiSearchSelect.changedSelect);