window.addEvent('domready', function() { var select, other; select = $('choose_one'); other = $('choose_one_other'); switchOther(); select.addEvent('change', switchOther); function switchOther() { if ( select.value == 'other' ) { other.disabled = false; } else { other.value = ''; other.disabled = true; } } });