I have two dropdown lists where I'm trying to pass the selected values for both to another function. I know that the way I am currently doing it is not correct, but I have been staring at this code for so long that I can't seem to find the probably simple solution.
d3.select("#parameterType").on("change", function()
{
var selectedParameter = this.value;
console.log(selectedParameter);
filterData(selectedParameter);
});
d3.select("#dateTimeTaken").on("change", function()
{
var selectedMonth = this.value;
console.log(selectedMonth);
filterData(selectedParameter, selectedMonth)
});
function filterData(selectedParameter, selectedMonth)
{
console.log(selectedParameter);
console.log(selectedMonth);
}
Can someone please help guide me in the right direction?