The field is not enabled even if my radio button is checked
<p>I have to elements radio button and text field: </p>

<pre><code>&lt;label&gt;&lt;input id="GRP010" type="RADIO" value ="900"&gt;Radio button&lt;/label&gt;
    &lt;input id="AF92" maxlength="254" size="15" name="AF92"&gt;
</code></pre>

<p>I want using jquery to disable text field, but enable it when the radio button is checked and value is equal. </p>

<p>So far I have wrote this:</p>

<pre><code>$(document).ready(function(){

    var value2 = $('input:radio[name="GRP010"]').val();
    var checked2 = $('input:radio[name="GRP010"]').is(':checked');

    if (checked2 == true &amp;&amp; value2 == '900') {
        $("#AF92").attr("enabled", "enabled");
    } else {
        $("#AF92").attr("disabled", "disabled"); 
    }
});
</code></pre>

<p>However, the text field is disable and not enabled if I select the radio button. How to I achieve this? Thanks</p>
