title: IE 11 error - Access is denied - XMLHttpRequest
body: <p>I'm having a peculiar error with IE11 and ajax. For nearly all the requests I make using the code below, everything is fine, yet when I try use in conjunction with a copy+paste method, it returns an Access is denied error. So to summarise</p>
  
  <ul>
  <li>This code works normally in most browsers for all functions I have written</li>
  <li>In IE 11 + Windows 8.1, it works in most cases, except when running a particular copy and paste function</li>
  <li>Interestingly, when using IE 11, but with a different Document mode such as 8, I still get the same error, even though it works natively in IE8 + Windows 7</li>
  <li>The error is 'Access is denied'</li>
  </ul>
  
  <p>Here is the AJAX code:</p>
  
  <pre><code>function ajaxRequest(requestName,responseFunction,parameters) {
   var xmlhttp;
   if (requestName.length==0) return;
   if (window.XMLHttpRequest)  {
       xmlhttp=new XMLHttpRequest();
   } else {
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   xmlhttp.onreadystatechange=function() {
       if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) {
          if(xmlhttp.responseText == 'Error') alert('Error processing request. Please refresh the page and try again');
          else if(xmlhttp.responseText != '') eval(responseFunction+"('"+xmlhttp.responseText+"')");
       }
   }
   var now = new Date();
   var url = "control/ajax.php?request="+requestName+"&amp;parameters="+parameters+"&amp;timestamp"+now;
   xmlhttp.open("GET",url,true);
   xmlhttp.send();
  }
  </code></pre>
  
  <p>An example of a failure, had the following variables set:</p>
  
  <p>requestName: "save_marksheet_mark"
  responseFunction: "update_save_marksheet_mark"
  parameters: [60962,1284,5]</p>
  
  <p>Is there something wrong with this code? Is there a reason why IE11 would throw an error with this code, in particular circumstances?</p>