title: Returning an integer from a select box - JavaScript
body: <p>Very simply, I want to be able to access the year from the select box as an integer.  In my test, my alertbox is telling me the value is undefined.</p>
  
  <pre><code>        &lt;form name="form1" method="post" action=""&gt;
        &lt;label&gt;birth year
        &lt;select name="birth year" id="dueYear"&gt;
        &lt;OPTION VALUE='' SELECTED&gt;--Year--&lt;/OPTION&gt;
  
      &lt;OPTION VALUE='2011'&gt;2011&lt;/OPTION&gt;
      &lt;OPTION VALUE='2010'&gt;2010&lt;/OPTION&gt;
      &lt;OPTION VALUE='2009'&gt;2009&lt;/OPTION&gt;&lt;/SELECT&gt;
  
       &lt;/select&gt;
        &lt;/label&gt;
      &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
  var dueDateYear = parseInt(document.getElementById("dueYear"));
  &lt;/script&gt;
  
  &lt;button onclick="alert(dueDateYear)"&gt;Click Me!&lt;/button&gt;
  </code></pre>
  
  <p>All I want it to do, is tell me the year I have selected -- any help would be appreciated, I am a newbie :(</p>