I have a web application consisting of two websites, one of which runs on port 8080 (Java), and the other on port 80 (IIS). Java web pages are called to IIS web pages, which are sometimes returned to Java web pages to obtain additional information. JavaScript that handles data exchange / data exchange works in IE , but not in Firefox.
Page 1 (IIS)> onClick of Button> Page 2 (Java / Tomcat)> User closes pop-up window> Transfer data to page 1
Javascript
if(window.attachEvent){
alert("AttachEvent");
window.attachEvent("onfocus", Focus_onfocusEvent);
window.objExitPopupWindow.attachEvent("onunload", Focus_onunloadExitEvent);
} else if(window.addEventListener){
try{
alert("Event Listener");
window.addEventListener("focus", Focus_onfocusEvent, true);
window.objExitPopupWindow.addEventListener("unload", Focus_onunloadExitEvent, true);
} catch(err) {
alert(err);
}
}
The problem I am facing:
a) In Firefox, if I have it turned on alert("Event Listener");, I get an error message
Error: Permission denied for "http://localhost" to get property Window.addEventListener from "http://localhost:8080".
b) Firefox, , , , Focus_onuloadExitEvent , Focus_onfocusEvent, . Focus_onunloadExitEvent.
, Firefox, IE - .. , onfocusEvent onunloadEvent, .