title: How to disable dropdowns and buttons based on the value of a column in a table
body: <p>I have a table with a set of columns fetching values from a database along with a dropdown and button in each row. Depending on the value of one of the columns(YEAR), the dropdown (SALARY) and button (UPDATE) need to be disabled. </p>
  
  <p>I tried two different approaches using Javascript and Jquery. But both don't seem to work.</p>
  
  <p>1) I tried triggering an event on pageload using Javascript</p>
  
  <pre><code>&lt;body onload="dropdownDisabler();"&gt;
  </code></pre>
  
  <p>Javascript part:</p>
  
  <pre><code>function dropdownDisabler()
  {
      if ($("#YEAR").val() &gt;= 2005)
      {
                      $("#SALARY").enabled=false;
                      $("#UPDATE").enabled=false;
      }
  
  }
  </code></pre>
  
  <p>2) I tried matching all the YEAR column elements which have a certain criteria using JQuery:</p>
  
  <pre><code>if($('#YEAR').val() &gt;= 2005)
  {
       $(this).find("#SALARY").prop('disabled',true);
       $(this).find("#UPDATE").prop('disabled',true);
  }
  </code></pre>