title: How to disable an Autocomplete textbox using javascript?
body: <p>I need to enable/disable some fields depending on a checkbox and combobox conditions. I am using JQuery. It works fine for normal textboxes, but not for the autocomlete. </p>
  
  <p><strong>HTML</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>ctr:txtBox code="miles"
  
  aut:Autocomplete code="replPerson"
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>$("[code=miles]").attr("disabled", "disabled"); //works fine
  $("[code=miles]").removeAttr("disabled");      //works fine
  
  $("[code=replPerson]").attr("disabled", "disabled"); //does not work
  $("[code=liters]").removeAttr("disabled"); //does not work
  </code></pre>
  
  <p>tried these variants as well (none of them worked for me):</p>
  
  <pre><code>//document.getElementById("txtPersona").readOnly = true; 
  //$("[code=replPerson]").prop("readonly", true);
  //$("[code=replPerson]").attr("readonly", "true");
  //$("[code=replPerson]").attr("enabled", "false");
  //$("[code=replPerson]").attr("class", "disabled");
  </code></pre>