This assumes there are only two drop-downs. That is not a safe assumption. This code should work regardless of how many dropdowns there are.