title: Referring to a value in a dropdown list in javascript
body: <p>I am building validation for my forms. I have covered the input text fields with the folowing code:</p>
  
  <pre><code>function validateForm_id()
  {
  var ctrl = document.forms["form1"]["id"];
  var x=ctrl.value;
  if (x==null || x=="") {
  document.getElementById('id').style.backgroundColor="#FFD4D4";
  document.getElementById("id").style.borderColor="#FF7A7A";
  document.all.id.innerText = "password required";
  </code></pre>
  
  <p>I would like to validate the value from my select drop down boxes. The values are:</p>
  
  <p>-- Select Title --<br>
  Mr<br>
  Mrs<br>
  Ms<br><br></p>
  
  <p>I would like the user to not be able to submit if -- Title -- is the value from the box.</p>
  
  <p>how do i refer to the first value of the dropdownbox in the <code>if (x==null || x=="")</code> of the above code? Here is my dropdown:</p>
  
  <pre><code>&lt;select name="title" onKeydown="Javascript: if (event.keyCode==13) post();" onFocus="validation_title()" onBlur="return validateForm_title()" id="title"&gt;
      &lt;option&gt;- Title -&lt;/option&gt;
      &lt;option value="1"&gt;Mr&lt;/option&gt;
      &lt;option value="2"&gt;Mrs&lt;/option&gt;
      &lt;option value="3"&gt;Ms&lt;/option&gt;
      &lt;option value="4"&gt;Other&lt;/option&gt;
  &lt;/select&gt; &lt;div align="center" id="title" style="font-size:small; color:#FF0000;"&gt;&lt;script type="text/javascript"&gt;document.all.title.innerText = " ";&lt;/script&gt;&lt;/div&gt;
  </code></pre>