Global.isSelected (value, selectedValue)
helper function used in Html.checkBox and Html.dropDown to check if a current value matches against one or more selected values

  • Parameter String:
    the current value
  • Parameter StringOrArray:
    the selectedValue
Sourcecode in /home/hannes/helma/modules/helma/Html.js:
63:   var isSelected = function(value, selectedValue) {
64:           if (selectedValue == null || value == null)
65:               return false;
66:           if (selectedValue instanceof Array)
67:               return Array.contains(selectedValue, value);
68:           return value == selectedValue;
69:       }