title: SCRIPT5007: Unable to get property 'value' of undefined or null reference in IE10
body: <p>I have a js function which compares the value in the select object and the value saved in the function.</p>
  
  <pre><code>function xyz()
  {
  document.getElementById("max1").options.value='abc';
  document.getElementById("max2").options.value='xyz';
  
      for (var i=0;i&lt;=document.formabc.max1.options.length;i++)
      {   
         if(document.getElementById("max1").options[i].value == 
          document.getElementById("max1").options.value)
         {
            //Some code
         }
      }
  }
  </code></pre>
  
  <p>I am getting an error that document.getElementById("max1").options[i] is undefined. I am using IE10. What can be a possible cause for the error.</p>