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.
Solved! Go to Solution.
05-25-2011 06:55 PM
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?
08-28-2013 12:41 PM
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.
11-08-2014 01:47 AM
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
11-20-2014 09:48 PM
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?
11-06-2015 09:55 AM