I've encountered this weird error lately. Here's the flow of the entire process.
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.
If the post is successful, it will first clear the div and rewrite it using the return value that was retrieved from that website.
The error occurred on point 2.
Here's the weird thing:
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 SCRIPT70: Permission denied. He was using Edge.
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.
How do I resolve this?
UPDATE
Here's the code that calls one website (or aspx) via JQuery Ajax Post, and retrieves and updates the div.
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);
}
});
}
UPDATE #2
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.
UPDATE #3
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.