Javascript DropDowns and Searching on Wordpress

Samg86

New member
Aug 2, 2009
16
0
0
I've been having some issues using two dropdown boxes to select categories, with a submit button that take the dropdown values and uses them to create a search URL.

For example, if I have Fruit in one dropdown and Vegetables in the other, I want the user to be able to pick 'Apples' and 'Cabbage' and then press a button and be taken to sitename.com/?s=apples+cabbage.

However I'm a complete beginner with Javascript and am struggling to understand how it should be set up in terms of functions. Also, I'm trying to figure out how the submit button actually triggers the hyperlink using Javascript (and how that the URL has been defined to begin with).

Any help would be greatly appreciated.