title: JavaScript read radio button value in IE and FireFox
body: <p>I have a simple web form that uses JavaScript for building a POST statement. In Chrome, I can use a simple line of code...</p>
  
  <pre><code>var form = document.forms['myForm'];
  var env = form.env.value;
  </code></pre>
  
  <p>The form itself looks like this...</p>
  
  <pre><code>&lt;form name="myForm" action='JavaScript:xmlhttpPost("/path/to/some/pythoncode.py")'&gt;
      &lt;input type="radio" name="env" id="env" value="inside"&gt;Inside
      &lt;input type="radio" name="env" id="env" value="outside" checked="checked"&gt;Outside
      &lt;input type="radio" name="env" id="env" value="both"&gt;Both
      &lt;input type="radio" name="env" id="env" value="neither"&gt;Neither
  </code></pre>
  
  <p>I have some text boxes on the form that I can use the same technique to find the value (
  <code>var name = form.fname.value</code>
  with a 
  <code>&lt;input type="text" name="fname" id="fname"&gt;</code>
  However, when I submit the form and build my post, the value for the radio buttons is always undefined. It works fine in Chrome, but nothing in IE or FireFox.</p>
  
  <p>I tried <code>var env = document.getElementById('env').value</code>, but for some reason that always defaults to the first value (inside) no matter what I select. That method also does not return a value when using Chrome.</p>
  
  <p>Is there something I'm missing for reading the checked value of a radio input in FF or IE?</p>