The value of a radio button group can be read by looping through the elements (you can research that). There is no need to use onclick events and setting the value of a radio button group is an illegal operation so cannot be expected to work.
Originally Posted by frrlod
Here's a fix for your code that keeps the onclick events to set a hidden field:
alert( f.response.value );
<input type='hidden' name='response'>
<input type="radio" name="fruit" onClick="this.form.response.value = 'oranges'">Oranges & Tangerines<br>
<input type="radio" name="fruit" onClick="this.form.response.value = 'bananas'">Bananas<br>
<input type="radio" name="fruit" onClick="this.form.response.value = 'peaches'">Peaches, Nectarines & Plums<br>
<input type="button" value="click here" onclick="FruitBox( this.form )">
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!