 <p>Since every <code>id</code> in a page must be unique, and the <code>&lt;s:radio&gt;</code> tag is generating multiple HTML tags, it is generating multiple <code>id</code>s; </p> <p>the real mistake however is that you are looping through radio buttons like if they would be checkboxes, while they're not. </p> <p><strong>Radio buttons allows only one choice</strong>. </p> <p>Take the element by name and read the value, to get the selected one, or empty if none is selected.</p> <p>Normally you could use <strong>dot notation</strong> (<code>.</code>)</p> <pre><code>document.forms[0].bean.gender.value </code></pre> <p>but since your name has a dot in it, you must use the other syntax (<code>[""]</code>):</p> <pre><code>document.forms[0]["bean.gender"].value </code></pre>