Would this work? Sending radio input data
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9618504/get-radio-button-value-with-javascript">Get Radio Button Value with Javascript</a>  </p>
</blockquote>



<p>I'm trying to post my input data. Most of it is in text boxes but one field is a radio button. I'm not sure the syntax is correct.</p>

<pre><code>var myProps = [];
            var type = document.getElementByName().value;

        function addProp(id) {
            if type = "text" {
            var value = encodeURIComponent(document.getElementById(id).value);
            }
            if type = "radio" {
            var value = encodeURIComponent(valueRadioButtonList(id).value);
            }
            myProps.push(id + "=" + value);
        }

        addProp('child_name');
        addProp('age');
        addProp('hometown');
        addProp('boy_girl');
            addProp('first_name');
        addProp('last_name');
        addProp('email');
        addProp('address1');
        addProp('address2');
        addProp('city');
        addProp('state');
        addProp('zip');
        addProp('country');

xmlhttp.send(myProps.join("&amp;"));
</code></pre>
