Disable Number field based on selection in dropdown via Jquery
<p>What I want to do is if a user selects "bycrypt", it should show a field to ask how many passes, and if he/she selects "sha512" to show the same field,but disabled. I was recommended to do this using Jquery,but my attempt is not working.
My code is as follows:</p>

<pre><code>    &lt;fieldset&gt;
    &lt;legend&gt;Security&lt;/legend&gt;
    &lt;label&gt;Hash Type&lt;/label&gt;
    &lt;select name="hash" id="myId"&gt;
            &lt;option value="bcrypt"&lt;?php if($hash == 'bcrypt') { echo ' selected="selected"'; } ?&gt;&gt;Bcrypt&lt;/option&gt;
            &lt;option value="sha512"&lt;?php if($hash == 'sha512') { echo ' selected="selected"'; } ?&gt;&gt;SHA512&lt;/option&gt;
        &lt;/select&gt;

    &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js" /&gt;&lt;/script&gt;
    &lt;label&gt;Bcrypt rounds &lt;i&gt;(12 Rounds is recommended)&lt;/i&gt;&lt;/label&gt;
    &lt;script type="text/javascript&gt;
    $("#myId").change(function() {
var tst = document.getElementById('myId').value;

if (tst ==1) {
    document.getElementById('#bcrypt_rounds').disabled=true;
} else {
    document.getElementById('#bcrypt_rounds').disabled=false;
}
});

    &lt;/script&gt;
&lt;input name="bcrypt_rounds" id="bcrypt_rounds" type="text" value="&lt;?php echo $bcrypt_rounds; ?       &gt;" /&gt;  
</code></pre>

<p>Updated above. Now cuts the page off after the "bycrpt_rounds" label. Does not get to the field for "bycrypt_rounds".       </p>
