title: VS 2013: Server Tag not well formed
body: <pre><code>    function changeSystemDDLIndex() {
          // Select the Site in SitesDDL = CustomerSiteIdOfSystem
          // Save the System ID into a hidden variable
          var systemsDDL = document.getElementById('ddlSystems');
          var system = systemsDDL.options[systemsDDL.selectedIndex].value;
          var sitesDDL = document.getElementById('ddlSites');
          var hidCustomerSiteId = document.getElementById("hdnCustomerSiteId");
          var hidCustomerSystemId = document.getElementById("hdnCustomerSystemId");
  
          if (systemsDDL.options[systemsDDL.selectedIndex].value == '') {
              // if System = N/A, Customer_Site_Id = '' then SitesDDL.SelectedIndex = 0 (N/A)
              sitesDDL.options[0].selected = true;
  
              // Set new values of hidden variables
              hidCustomerSiteId.value = '';
              hidCustomerSystemId.value = '';
          }
          else {
              var isFound = false;
              var CustomerSiteIdOfSystem = systemsDDL.options[systemsDDL.selectedIndex].attributes['Customer_Site_Id'].value;
  
              // Find the Customer_Site_Id in SitesDDL options and set it
              var j = sitesDDL.options.length;
              var i;
  
              alert('i = ' + i);
              alert('j = ' + j);
              i++;
              alert('j = ' + j);
              alert('i = ' + i);
              **for (i = 1; i &lt; j; i++) {**
                  alert('dfd');
              }
  
          }
          return;
      }
  </code></pre>
  
  <p>I receive "The server tag is not well formed." error at "for (i = 1; i &lt; j; i++) {" statement. If I remove the for statement, the code works.</p>
  
  <p>How can I correct it please? I am using VS2013, .Net FW 3.5.</p>