title: Javascript if select box is disabled no error
body: <p>currently im working with a form that on submit uses javascript to validate all of the forms input fields and throws errors if a field is incomplete. I have an option though, that when checked will disabled a few of the inputs, and im looking to <code>stop the errors from being thrown if the textbox is disabled.</code></p>
  
  <p>relevant code includes: </p>
  
  <p>html:</p>
  
  <pre><code>                &lt;select name="os" id="os"&gt;
                      &lt;option&gt;-Select-&lt;/option&gt; 
                      &lt;option value="A"&gt;Android&lt;/option&gt; 
                      &lt;option value="I"&gt;iOS&lt;/option&gt;
                       &lt;option value="W"&gt;Windows Mobile&lt;/option&gt; 
                   &lt;/select&gt; &lt;font color="#CC0000"&gt;*&lt;/font&gt;
  </code></pre>
  
  <p>js</p>
  
  <pre><code>if (document.FrontPage_Form1.Action[0].checked==true) 
      {
          var dropvalue = document.getElementById("os");
          var dropText = dropvalue.options[dropvalue.selectedIndex].text;
  
  
              if (dropText=="-Select-") &amp;&amp; (dropvalue.disabled=false)
              {
                  document.getElementById("OS_Msg").style.display='';
                  document.getElementById("OS_Err").style.display='';
  
                  valid==false;
              }
  
      }
  </code></pre>
  
  <p>jQuery disable</p>
  
  <pre><code>&lt;p&gt;&lt;input type="checkbox" name="noPhone" id="noPhone"&gt;: My Device does not have a phone number.&lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;
  
              $("#noPhone").click(onCheckChange).change(onCheckChange);
  
                          function onCheckChange() {
                            if ($("#noPhone").is(':checked'))
                            {
                              $("select.focusDrop").attr('disabled', 'disabled');
                              $(":text").attr('disabled', 'disabled');
                            }
                            else
                            {
                              $("select.focusDrop").removeAttr('disabled');
                              $(":text").removeAttr('disabled');
                            } 
                          }
  
              &lt;/script&gt;
  </code></pre>