title: [HTML/JavaScript]: getElementByID not getting value
body: <p>I am not able to figure out why it is not tracing value for CompanyType. If I remove the CompanyType block from verification, it works well. It even successfully verifies CompanyName, but it fails at CompanyType.</p>
  
  <p>Below is the code:</p>
  
  <pre><code>&lt;script type="text/javascript&gt;
  
  //Check Company Name
  if (document.getElementById("CompanyName").value == "")
  {
       alert("Please enter company name");
       document.getElementById("CompanyName").focus();
       return false;                              
  }
  
  //Check Company Type                            alert(document.getElementById("CompanyType").value);
  if (document.getElementById("CompanyType").value.substr(0,6) == "Select")
  {
       alert("Please select company type");
       document.getElementById("CompanyType").focus();
       return false;                              
  }
  &lt;/Script&gt;
  </code></pre>
  
  <p>Following lines follow in the HTML code in the file:</p>
  
  <pre><code>&lt;td align="left" valign="top"&gt;
  &lt;input maxlength="40" size="22" name="CompanyName" id="CompanyName" style="width:150px;"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td height="38" colspan="2" valign="middle" id="form"&gt;
  &lt;span class="red"&gt;*&lt;/span&gt;
  &lt;span class="style2"&gt;Company Type:&lt;/span&gt;
  &lt;/td&gt;
  
  &lt;td align="left"&gt;
  &lt;select id=" " class="style3" size="1" name="CompanyType" style="width:150px;"&gt;                                                                      &lt;option value="" selected="selected"&gt;Select One&lt;/option&gt;                                                                               &lt;/select&gt;&lt;/td&gt;
  </code></pre>