Commit afa290c1 authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

New function: get values of current options

Returns the values of the currently selected options in the linked
drop down lists
parent 939afbc5
......@@ -144,3 +144,17 @@ document
// These functions run after "DOMContentLoaded" event
populateFirstLevelDropDown();
applyDropDown();
/**
* Get the values from the currently selected options in the linked drop dpwn lists
* @returns {Array} An array containing the values of the selected options
*/
const getSelectedOptionsFromDropDownLists = function () {
const selectedBuilding = document.querySelector("#drop-down--bldg").value;
const selectedSensor = document.querySelector("#drop-down--sensor").value;
const selectedSamplingRate = document.querySelector(
"#drop-down--sampling-rate"
).value;
return [selectedBuilding, selectedSensor, selectedSamplingRate];
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment