Или так?)
<input type="radio" id="i1" name="r">
<input type="radio" id="i2" name="r">
<input type="radio" id="i3" name="r">
<input type="text">
<script type="text/javascript">
var input=document.getElementsByTagName('input'),i=input.length;
function f(){ if(this.checked)input[3].value=this.id }
while(i--)if(input[i].type=='radio')input[i].onclick=f;
</script>