Clearing a textbox field when a radio button is selected in Javascript
<p>I have a web form which allows users to donate money using the predefined radio buttons with a value assigned to them (all different numbers). I also have a choose your own amount textfield which they can write in a custom amount they wish to donate. I want to clear the custom textfield if a user selects a predefined choice.</p>

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

<p><strong>HTML:</strong></p>

<pre><code>&lt;input type="radio" name="am_payment" value="3" checked="checked"&gt; &lt;strong&gt;64&lt;/strong&gt;
&lt;input type="radio" name="am_payment" value="11" checked="checked"&gt; &lt;strong&gt;100&lt;/strong&gt;
&lt;input type="radio" name="am_payment" value="32" checked="checked"&gt; &lt;strong&gt;250&lt;/strong&gt;
&lt;input type="radio" value="" name="am_payment"&gt;&lt;label&gt;Other&lt;/label&gt;
&lt;input type="text" name="CP_otheramount" value="" id="theamount" disabled="disabled"/&gt;
</code></pre>

<p><strong>JAVASCRIPT:</strong></p>

<pre><code>$('input[name="am_payment"]').on('click', function() {
   if ($(this).val() === '') {
      $('#theamount').removeProp("disabled");
   }
   else {
      $('#theamount').prop("disabled", "disabled");
      $('input[name="CP_otheramount"]').val("");
   }
});
</code></pre>

<p>But basing it on a <code>value === true</code> for <code>value=""</code> just doesn't seem right.</p>

<p>Is there a way to improve this?</p>

<p>Thanks</p>