title: SCRIPT70: Permission denied on JQuery Ajax Post
body: <p>I've encountered this weird error lately. Here's the flow of the entire process.</p>
  
  <ol>
  <li>There is a JQuery ajax post call to a website that will refresh the contents of a div. It will pass in the parameters to that website and will return the HTML script.</li>
  <li>If the post is successful, it will first clear the div and rewrite it using the return value that was retrieved from that website.</li>
  </ol>
  
  <p>The error occurred on point 2.</p>
  
  <p>Here's the weird thing:</p>
  
  <p>In my machine it is working fine (Windows 8) and also in the virtual machine (Windows 10). I used the same browser (IE 11 and Edge) for both. However, my colleague was not able to do  point 2 because he got the client side error <strong>SCRIPT70: Permission denied.</strong> He was using Edge.</p>
  
  <p>I will post part of the code in my next update. But so far I've checked it in terms of security but none really. </p>
  
  <p>How do I resolve this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here's the code that calls one website (or aspx) via JQuery Ajax Post, and retrieves and updates the div.</p>
  
  <pre><code>function RefreshDiv(isChild) {
    var data = {
      ActionType: "AJAX",
      Action: "Refresh"
    };
  
    $.post("RefreshDivContents.aspx", data, function (result) {
      if(result != '') {
        var divItems;
  
        if(isChild) {
            divItems = window.parent.$("#TopDiv").find("#DivItems");
        }
        else {
            divItems = $("#DivItems");
        }
  
        divItems.empty(); // error hit here.
        divItems.append(result);
      }
    });
  }
  </code></pre>
  
  <p><strong>UPDATE #2</strong>
  I updated the sample code for more information. Also, I placed where the error occurred but I don't know why it hit there. It should clear out the items only.</p>
  
  <p><strong>UPDATE #3</strong>
  Based on Jacob's reply, I got curious as to what is the protocol and port numbers of the two iframe src's. Below is the result based on the console.</p>
  
  <p><a href="https://i.stack.imgur.com/jDPrU.png" rel="nofollow"><img src="https://i.stack.imgur.com/jDPrU.png" alt="enter image description here"></a></p>