i have 2 pages, page1.html(mypage), and page2.html(external), page1.html is loading page2.html using iframe. page2.html have basically information of user, it contain menus , forms. There is a logout function with below code
$('#inetLogoutId').click(function(event) {
var logoutMsg = "Are you sure you want to log out?";
dialogConfirm(logoutMsg, function() {
top.document.location.href = path + "/logout";
})
});
logout not working because of Uncaught DOMException: Blocked a frame with origin "https://example.com" from accessing a cross-origin frame.
, what if logout function is modified to window.top.location.href
. What's the main difference between these 2.
Thank you