title: Can't set disabled=false (javascript)
body: <p>I have this function:</p>
  
  <pre><code>function disableDiv(divId, action){
      var divId = byId(divId);
  
      if(action==true){
      divId.style.display='none';
      }
      else if(action==false){
      divId.style.display='block';
      }
  
      var inputs = divId.getElementsByTagName("input");
      var selects = divId.getElementsByTagName("select");
      var i;
  
      for (i=0; i&lt;inputs.length; i++){
          inputs[i].disabled=action;
          }
  
      for (i=0; i&lt;selects.length; i++){
          selects[i].disabled=action;
          }
  }
  </code></pre>
  
  <p>This takes a divId (id of DIV) and an action (false or true) and gets all inputs and selects inside the div, and sets their disabled attribute to either false or true.</p>
  
  <p>According to Firebug, the elements inside the Div are disabled all the time. But they should be active once hitting a drop-list option... The triggering is fine so you know.
  I can see this function beeing called by using alert boxes, and it does in fact set the disabled=false. But the elements are still disabled.</p>
  
  <p>Something to point out is that according to firebug, the disabled attribute looks like this:</p>
  
  <pre><code>    &lt;input name="test" id="test" disabled=""&gt;
  </code></pre>
  
  <p>Note there is just two doublequotes... Shouldn't it say "disabled='disabled'" or "disabled=true"?</p>
  
  <p>Any tips on how to troubleshoot further?</p>
  
  <p>Here is how I call the function:</p>
  
  <pre><code>(category=="Cars")?disableDiv("nav_sub_cars", false):disableDiv("nav_sub_cars", true);
  </code></pre>
  
  <p>If you need more input, just let me know...</p>
  
  <p>Thanks</p>