Configure 2 select boxes with a single function executable with a button

Hi Guys!
I am novice developer, and really in a terrible situation as I cannot figure out a way to configure 2 select boxes with a single function which is executable when a button is pressed.

So, I am developing a system that filters out a list on the basis of Year and Place. There are three different functions in my code, 1 function for a search field and 2 functions for select boxes. And, they are not configured with a button, which overrides the Filtered List which I clearly don’t want. I am attaching a link to the file so that you can see whats happening.

What I have is 2 select boxes which have similar functions attached as for example,
function changeYear(this, this.selectedIndex);
which clearly I don’t want.

What I want is a function that obtains the values from the select boxes with different id, and, then I configure it with a button. That’s all.

ThanK You in advance.

Good to see that the javascript classes are changing from doing the ‘make’ and ‘model’ dropdowns this year.

You’ve already got a button that runs a script on click. Take the code from the two functions you’ve got already, stuff them into a function, make a single button, and set it’s onclick to be that function?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.