Headaches with radios in Jquery
<p>I have 2 radios:</p>

<pre><code>&lt;input id="a_15_0" type="radio" value="abc" name="a_15"/&gt;
&lt;input id="a_15_1" type="radio" value="xyz" name="a_15"/&gt;
</code></pre>

<p>Both are unselected. I have only the name of the radio, i.e <code>a_15</code>, but not the IDs.</p>

<p><strong>1)</strong> How can I get the value of the selected option of this radio? E.g if the user clicked 'xyz', how can I get it? Right now I'm using:</p>

<pre><code>var val=$('[name="a_15"]').val();
</code></pre>

<p>Which always gives abc even when xyz is selected.</p>

<p><strong>2)</strong> How can I get xyz to be selected through javascript, without knowing the ID of the radio which says xyz? Doing:</p>

<p>$('[name="a_15"]').val('xyz');</p>

<p>Changes the value of both radios to xyz rather than selecting the one whose value had been xyz.</p>

<p>Do I need to use <code>document.myForm.a_15.value</code>? Would that work consistently?</p>
