Disabling a textbox when the other textbox have a value HTML
<p>im sorry for this question but how can i disable a textbox if another textbox have a value?? 
I already try this code but its not working,, sorry for the noob question T_T</p>

<pre><code>function disable(downpayment,full_payment)
{

if ( downpayment.value.length &gt;= 1 )
document.getElementById(full_payment).disabled = true;

else

document.getElementById(full_payment).disabled = false;
}



&lt;/script&gt;
        &lt;input name="downpayment" id="downpayment" type="text" onselect="function disable(downpayment,full_payment);" style="width:250px" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
        &lt;input name="full_payment" id="full_payment" type="text" style="width:250px" /&gt;
</code></pre>
