title: How to re-enable a disabled dropdownlist & how to clear textbox data
body: <p>I have the following html inside ym asp.net mvc web application:-</p>
  
  <pre><code>&lt;span class="f"&gt;Customer Name&lt;/span&gt;
  
  &lt;select data-val="true" data-val-length="The field CustomerName must be a string with a maximum length of 50." data-val-length-max="50" data-val-required="The CustomerName field is required." id="FirewallCustomer_CustomerName" name="FirewallCustomer.CustomerName"&gt;&lt;option value=""&gt;Choose...&lt;/option&gt;
  //code goes here…
  &lt;/select&gt;
  
  &lt;span class="field-validation-valid" data-valmsg-for="FirewallCustomer.CustomerName" data-valmsg-replace="true"&gt;&lt;/span&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
  &lt;span class="f"&gt;VLANS&lt;/span&gt;
  
  &lt;select data-val="true" data-val-number="The field CustomerVLANSID must be a number." data-val-required="The CustomerVLANSID field is required." id="FirewallCustomer_CustomerVLANSID" name="FirewallCustomer.CustomerVLANSID"&gt;&lt;option value=""&gt;Choose..&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;span class="field-validation-valid" data-valmsg-for="FirewallCustomer.CustomerVLANSID" data-valmsg-replace="true"&gt;&lt;/span&gt;
  
  &lt;div&gt;
  &lt;span class="f"&gt;VLAN IP&lt;/span&gt; &lt;input disabled="disabled" id="VLANIP" name="VLANIP" type="text" value="" /&gt;
  &lt;/div&gt;
  
  &lt;div&gt;&lt;span class="f"&gt;VLAN Sub NET Mask&lt;/span&gt; &lt;input disabled="disabled" id="Subnetmask" name="Subnetmask" type="text" value="" /&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have the following Script</p>
  
  <pre><code>   $(document).ready(function () {
      $("#FirewallCustomer_CustomerVLANSID").attr("disabled", "disabled");
  
  
          $("#FirewallCustomer_CustomerName").change(function () {
              var idDC = $(this).val();
              var select = $("#FirewallCustomer_CustomerVLANSID");
  
               $("VLANIP").val('');
              $("Subnetmask").val('');
              select.empty();
  
         $("#SFirewallCustomer_CustomerVLANSID").removeAttr("disabled");
              $.getJSON("/Firewall/LoadVLANSByCustomerName", { customername: idDC },
  
              function (VLANData) {
  
                  select.append($('&lt;option/&gt;', {
                      value: null
                  }));
                  $.each(VLANData, function (index, itemData) {
  
                      select.append($('&lt;option/&gt;', {
                          value: itemData.Value,
                          text: itemData.Text
                      }));
                  });
              });
          });
  
  });
  </code></pre>
  
  <p>but I am facing the following probems:-</p>
  
  <ol>
  <li><p>The drop down list will not be re-ebabled</p>
  
  <p>$("#SFirewallCustomer_CustomerVLANSID").removeAttr("disabled");</p></li>
  <li><p>And the </p>
  
  <p>$("VLANIP").val('');</p>
  
  <p>$("Subnetmask").val('');</p></li>
  </ol>
  
  <p>Will not clear the text.</p>
  
  <p>Can anyone advice what is the problem ?
  Thanks</p>