title: Why this form doesn't work? Javascript: number values in options from select input
body: <p>I have this form that should show an error message if the value of Start time is higher than the one from End time, but if I select start at 8:00am and end at 4:00am it doesn't show an the error message, unless i put left zeros to numbers 1 to 9 (01, 02, 03, 04, 05, 06, 07, 08, 09), is like 1-9 without zeros were recognized as higher numbers than 10 - 48, why is that?</p>
  
  <p>This work:</p>
  
  <pre><code>&lt;script&gt;
  function execute_onclick()
  {
      var result;
  
      if (document.forms[0].endtime.value &gt;  document.forms[0].starttime.value)
      {
          result = "CORRECT";
      }
      else
      {
          result = "ERROR";
      }
  
      alert(result);
  
      return false;
  }
  &lt;/script&gt;
  &lt;option value=01 &gt;12:00 am&lt;/option&gt;
  &lt;option value=02 &gt;12:30 am&lt;/option&gt;
  &lt;option value=03 &gt;1:00 am&lt;/option&gt;
  &lt;option value=04 &gt;1:30 am&lt;/option&gt;
  &lt;option value=05 &gt;2:00 am&lt;/option&gt;
  &lt;option value=06 &gt;2:30 am&lt;/option&gt;
  &lt;option value=07 &gt;3:00 am&lt;/option&gt;
  &lt;option value=08 &gt;3:30 am&lt;/option&gt;
  &lt;option value=09 &gt;4:00 am&lt;/option&gt;
  &lt;option value=10 &gt;4:30 am&lt;/option&gt;
  </code></pre>
  
  <p>This doesnt work:</p>
  
  <pre><code>&lt;script&gt;
  function execute_onclick()
  {
      var result;
  
      if (document.forms[0].endtime.value &gt;  document.forms[0].starttime.value)
      {
          result = "CORRECT";
      }
      else
      {
          result = "ERROR";
      }
  
      alert(result);
  
      return false;
  }
  &lt;/script&gt;
  &lt;option value=1 &gt;12:00 am&lt;/option&gt;
  &lt;option value=2 &gt;12:30 am&lt;/option&gt;
  &lt;option value=3 &gt;1:00 am&lt;/option&gt;
  &lt;option value=4 &gt;1:30 am&lt;/option&gt;
  &lt;option value=5 &gt;2:00 am&lt;/option&gt;
  &lt;option value=6 &gt;2:30 am&lt;/option&gt;
  &lt;option value=7 &gt;3:00 am&lt;/option&gt;
  &lt;option value=8 &gt;3:30 am&lt;/option&gt;
  &lt;option value=9 &gt;4:00 am&lt;/option&gt;
  &lt;option value=10 &gt;4:30 am&lt;/option&gt;
  </code></pre>