title: JS error: object expected
body: <p>I load an internal page that I developed in IE and at the bottom it displays some JS error:
  It says Line 107 character 6.  I look at the JScript file and it has this code:</p>
  
  <pre><code> function isLessThanStartDate(obj)
      {
       var startdate = new Date(document.getElementById('txtSD').value);
       var enddate = new Date(obj.value);
       var weekending = new Date(document.getElementById('txtWE').value);
  
       if (!(isDate(startdate)))
     {
          obj.style.backgroundColor="red";
          alert (obj.value + " is not a valid date!");
          obj.value="";
          return;
     }
  
       if (enddate &lt; startdate)
        {
        obj.style.backgroundColor="red";
        alert ("End date: " + enddate + " cannot be less then start date: " + startdate);
        obj.value="";
        }
       else if (enddate &gt; weekending)
       {
        obj.style.backgroundColor="red";
        alert ("End date: " + enddate + " cannot be greater then week ending date: " + weekending);
        obj.value="";
       }
        else
        {
        obj.style.backgroundColor="";
        }      
      }
  </code></pre>
  
  <p>Line 107 is the line where it says</p>
  
  <pre><code>var weekending = new Date(document.getElementById('txtWE').value);
  </code></pre>
  
  <p>Why is this complaining? I don't see anything wrong with it...</p>