Enabling a text box depending upon the selected value in a drop down
<p>Hi I have an HTML page which has a text box and a dropdown box. When the page is loading for the first time, then depending upon the value in the drop down(Selected) the text box needs to be enabled or disabled. I want to do this using javascript or jquery. I need a little help.</p>

<pre><code>&lt;table&gt;
  &lt;tr&gt;
    &lt;td class="td"&gt;
      &lt;input type="text" size="3" name="length21" value="0" disabled="disabled"/&gt;
    &lt;/td&gt;
    &lt;td class="td"&gt;
      &lt;div class="type"&gt;
        &lt;select name="type1" id="field_type"&gt;
          &lt;option value="TEXT" SELECTED=""&gt;TEXT&lt;/option&gt;
          &lt;option value="TEXTAREA" &gt;TEXTAREA&lt;/option&gt;
          &lt;option value="DROPDOWN" &gt;DROPDOWN&lt;/option&gt;
          &lt;option value="DATE" &gt;DATE&lt;/option&gt;
          &lt;option value="CHECKBOX" &gt;CHECKBOX&lt;/option&gt;
          &lt;option value="SEPARATOR" &gt;SEPARATOR&lt;/option&gt;
          &lt;option value="DATETIME" &gt;DATETIME&lt;/option&gt;
          &lt;option value="HIERARCHY" &gt;HIERARCHY&lt;/option&gt;
        &lt;/select&gt;
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class="td"&gt;
      &lt;input type="text" size="3" name="length21" value="0" disabled="disabled"/&gt;
    &lt;/td&gt;
    &lt;td class="td"&gt;
      &lt;div class="type"&gt;
        &lt;select name="type2" id="field_type"&gt;
          &lt;option value="TEXT" &gt;TEXT&lt;/option&gt;
          &lt;option value="TEXTAREA" &gt;TEXTAREA&lt;/option&gt;
          &lt;option value="DROPDOWN" SELECTED=""&gt;DROPDOWN&lt;/option&gt;
          &lt;option value="DATE" &gt;DATE&lt;/option&gt;
          &lt;option value="CHECKBOX" &gt;CHECKBOX&lt;/option&gt;
          &lt;option value="SEPARATOR" &gt;SEPARATOR&lt;/option&gt;
          &lt;option value="DATETIME" &gt;DATETIME&lt;/option&gt;
          &lt;option value="HIERARCHY" &gt;HIERARCHY&lt;/option&gt;
        &lt;/select&gt;
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Now what I want is, when the page loads, for the row where the drop down is having TEXT selected, the text box will get enabled. But not for the other. I would really appreciate any kind of help.</p>
