title: IE Java script error Unable to get value of the property '0':
body: <p>I have an:</p>
  
  <pre><code>&lt;img id="uploadedimage" alt="uploaded image" src="" width="250px" height="250px"/&gt;
  </code></pre>
  
  <p>and have a div to display the image once the user has selected their image using this JQuery code:</p>
  
  <pre><code>$('#BusinessImage').change(function (ev) {
  
              var f = ev.target.files[0];
              var fr = new FileReader();
              var IsImage = false;
  
              // check the file is an image
              if (f.type.match('image.*')) {
                  IsImage = true;
              }
  
              fr.onload = function (ev2) {
                  if (IsImage) {
                      $('#uploadedimage').attr('src', ev2.target.result);  
                  }
              };
  
              if (IsImage) {
                  fr.readAsDataURL(f);
                  ValidFileUpload();
              }
              else {
                  InvalidFileUpload();
              }
          });
  </code></pre>
  
  <p>Of course this code works great in every other browser apart from Satans browser, Internet Explorer. I get this error: </p>
  
  <pre><code>Line: 108
  Character: 13
  Code: 0
  Error Message: Unable to get value of the property '0': object is null or undefined
  </code></pre>
  
  <p>Does anyone have any idea what is causing this as it works great in FFX and Chrome.</p>
  
  <p>Thanks</p>