Limiting a Group of Select Boxes to Allow Only One to be a Certain Value
<p>Using jQuery, I'd like to make a set of select boxes function in a way that only one can be "yes".  So, if the user selects "yes", all others are set to "no".</p>

<p>I thought I had code that worked.  Unfortunately, I have discovered that the code does not work in Firefox if the user is using the keyboard exclusively for navigation.  It works fine if the user uses a mouse to change a field.  Just to clarify, 0 is the value for "No".</p>

<p>Here is the function:</p>

<pre><code>function f_one(cls)
{
    $('.'+cls).filter('select').not('.'+cls+':focus').val('0');
}
</code></pre>

<p>It is called in the onchange event of the group of select boxes that resemble the following:</p>

<pre><code>&lt;select name="crrnt" id="crrnt" class="cAgo" onchange="f_one('cAgo')"&gt;
</code></pre>

<p>I also tried to have the onkeyup event mimic the onchange event.  It did not work either. It actually set field back to 0 when focus was lost.</p>

<p>So, any suggestions on patching the code or a replacement would be great.</p>
