title: Struts finding checked radio button
body: <p>I created a radio button in struts however i saw the radio button accepts a list so i provided a list <code>{true:'Yes',false:'No'}</code>. This creates a radio button pair with Yes and No labels however i would like to use javascript to get the radio button thats checked.</p>
  
  <p>When the radio buttons are created they are give Id's with <em>'name'true</em> and <em>'name'false</em>. I am confused as to how i will use javascript to get the checked radio button and its value. Under is my code:</p>
  
  <p><strong>Struts Radio Button</strong></p>
  
  <pre><code>&lt;s:radio name="over18" id= "over18Stat" list="#{true:'Yes',false:'No'}" 
                  onclick="Over18Changed(this.value)"/&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <p>I have tried this however it does not work</p>
  
  <pre><code>var ofage = document.getElementByName('over18').value ;
  </code></pre>