title: JavaScript runtime error: Object doesn't support property or method 'addEventListener
body: <p>Am using Asp.Net 2.0, am trying drag and drop files using asp.net.
  for this process am using following js's</p>
  
  <pre><code>&lt;script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../Scripts/modernizr-2.5.3.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>that's why the error comes like this</p>
  
  <pre><code>JavaScript runtime error: Object doesn't support property or method 'addEventListener 
  </code></pre>
  
  <p>am using IE11</p>
  
  <p>so i was used one code </p>
  
  <pre><code>&lt;meta http-equiv="X-UA-Compatible" content="IE=edge;" /&gt;
  </code></pre>
  
  <p>it is not working </p>
  
  <p>and my script is </p>
  
  <pre><code> &lt;script type="text/javascript" language="javascript"&gt;
  
  
  
      var selectedFiles;
  
        $(document).ready(function () {
  alert("");
          if (!Modernizr.draganddrop) {
          //alert("2");
            alert("This browser doesn't support File API and Drag &amp; Drop features of HTML5!");
            return;
          }
  
          var box;
          box = document.getElementById("box");
         alert(box);
          box.addEventListener("dragenter", OnDragEnter, false);
          box.addEventListener("dragover", OnDragOver, false);
          box.addEventListener("drop", OnDrop, false);
  
          $("#upload").click(function () {
            var data = new FormData();
            for (var i = 0; i &lt; selectedFiles.length; i++) {
              data.append(selectedFiles[i].name, selectedFiles[i]);
            }
            $.ajax({
              type: "POST",
              url: "FileHandler.ashx",
              contentType: false,
              processData: false,
              data: data,
              success: function (result) {
                alert(result);
              },
              error: function () {
                alert("There was error uploading files!");
              }
            });
          });
  
        });;
  
        function OnDragEnter(e) {
          e.stopPropagation();
          e.preventDefault();
        }
  
        function OnDragOver(e) {
          e.stopPropagation();
          e.preventDefault();
        }
  
        function OnDrop(e) {
          e.stopPropagation();
          e.preventDefault();
          selectedFiles = e.dataTransfer.files;
          $("#box").text(selectedFiles.length + " file(s) selected for uploading!");
        }
  
  
  
      &lt;/script&gt;
  </code></pre>
  
  <p>and my aspx page is </p>
  
  <pre><code>&lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;center&gt;
    &lt;div id="box"&gt;Drag &amp; Drop files from your machine on this box.&lt;/div&gt;
    &lt;br /&gt;
    &lt;input id="upload" type="button" value="Upload Selected Files" /&gt;
  &lt;/center&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p>But this application drag and drop files is working fine in chrome and firefox
  only problem in IE</p>
  
  <p>Suggest me to get a solution.
  Thanks in advance.</p>