I have a form with two radio buttons. One button id'd as 'trigger_unit', the other as 'normal_unit'. There is also a select drop down with four values and a default NULL value.
<select rel="dropdown" name="trigger_id" id="trigger_id"
onchange="((this.value != '') ? document.getElementById('trigger_unit').checked=true :
document.getElementById('normal_unit').checked=true;)" style="width: 120px;">
<option value="" selected="selected">--none--</option>
<option value="1">Critical</option>
<option value="2">Draw</option>
<option value="4">Heal</option>
<option value="3">Stand</option>
</select>
What's supposed to happen is the javascript is supposed to change the value of the radio button if there is a non-blank value from the drop down. I tried to follow the in-line IF example here but it's not exactly working. Can this be done or do I HAVE to write a second function?