function test_why(box_id, dropdown){ //var info = document.getElementById(dropdown).value var info1 = dropdown[dropdown.selectedIndex].value alert(info1) if(info1 == 0){ var box = 'why_box_' + box_id var drop = 'why_drop_' + box_id document.getElementById(drop).display = 'none' document.getElementById(box).display = 'block' } }