Showing results for 
Search instead for 
Did you mean: 

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

I'm using the brand new hosted option for CIM (with php) with is very nice.  It's working just fine for me... except one problem - the closePopup function in popup.js never gets called when I click cancel on the iframe form or have a successful save.  I've tried everything with no luck - I don't know if it's something I'm doing or something not firing on the hosted form page.  I'm not that great at javascript, but I tried debugging the script as it ran (profile.js) and it seemed to get to the part where it sends the 'cance' string to the iframecommunicator (which was valid), but then it seemed to get lost before triggering anything in popup.js.  If that makes any sense or you know what the problem is, please let me know!  I need to get this working. 

Thanks.  By the way, I'm using in a codeigniter framework, but I don't think that should have any effect on the issue, and everything besides the popup close is working fine.



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?

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 ( give in the xml file called during open ifram.  Also the domain of the ( 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 "" from accessing a frame with origin "". Protocols, domains, and ports must match.  Can you please suggest me waht i am doing wrong. Thanks in advance.

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() {

document.getElementById("divAuthorizeNetPopupScreen").style.display = "none";
document.getElementById("divAuthorizeNetPopup").style.display = "none";
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 


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?