Reply
Highlighted
Member
Posts: 1
Registered: ‎08-28-2013

Re: CIM hosted form option - popup won't close on cancel or suscessful save

So I am having the same issue...and the fix by Sathish worked! However....It only works when I change the settings in IE as he suggested.  This is a problem because by default "Display Mixed Content" is disabled in both Firefox and IE.  That means that the majority of users will have the same problem of the popup not closing.

 

Does anyone know of a solution for this?

Highlighted
Member
Posts: 4
Registered: ‎09-25-2014

Re: CIM hosted form option - popup won't close on cancel or suscessful save

Hi I am also trying to close popup after saving or close action. but it did not work. As you suggest i check my iframe communicator url (https://test.com:8443/ecommerce/control/hostedProfileResponse) give in the xml file called during open ifram.  Also the domain of the (https://test.com:8443/ecommerce/control/callCim) are same but i frame does't close on the action. I check in the browser console it gives issue Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://test.com:8443" from accessing a frame with origin "https://test.authorize.net". Protocols, domains, and ports must match.  Can you please suggest me waht i am doing wrong. Thanks in advance.

Highlighted
Contributor
Posts: 10
Registered: ‎07-23-2014

Re: CIM hosted form option - popup won't close on cancel or suscessful save

Found a simple solution to this.

 

Added window.close() which close the popup after displaying the message "Your information has been saved" on click of the save button

 

AuthorizeNetPopup.closePopup = function() {

window.close();
document.getElementById("divAuthorizeNetPopupScreen").style.display = "none";
document.getElementById("divAuthorizeNetPopup").style.display = "none";
document.getElementById("iframeAuthorizeNet").src="contentx/empty.html";
if (AuthorizeNetPopup.options.onPopupClosed) AuthorizeNetPopup.options.onPopupClosed();
};

 

One more thing the hostedProfileIFrameCommunicatorUrl has to be with respect to the domain from where the popup is launched 

Highlighted
Member
Posts: 1
Registered: ‎11-06-2015

Re: CIM hosted form option - popup won't close on cancel or suscessful save

I use onclick function and hide the hosted form.But when i click on review button for payment it does'nt redirect next page.Is any solution?