Close Window button within HTML in floatbox

Page: 1

Author Post
Member
Registered: Apr 2012
Posts: 3
I have a third party-hosted payment page that returns with a second page with a button (on success or error of payment) that requires user to click to close window.

For exact example:

on http://teadesign.co.uk/aidsark, select "Donate" on the very top menu.

It should pop up with a floatbox to our test payment page hosted via a third party.  It works great for entry of payment, but for second step (on error or success), they offer page to inform of error or success and include a button to close the window.  
Pressing the button does nothing when inside a floatbox.

How can I get the floatbox to close when they click on the button (as well as when they click the close on floatbox)?

Thanks,
William
Administrator
Registered: Aug 2008
Posts: 3382
Ordinarily, it would be quite simple to close the floatbox simply by calling the parent.fb.end() function. However, you're out of luck in your particular case because the donation form in the floatbox is a cross-domain iframe. It is running under https, as it should, while the originating page is running under http. Because the protocols are different, cross-domain scripting prevention is in effect and the two pages cannot exchange any javascript instructions. You cannot close a cross-domain iframed floatbox from a script or action that occurs inside the iframe page.

In the case of your donation page, I think if you need the ability to call parent.fb.end() then you will need to run the parent page as https as well. But if the donation page comes from a different site anyway, (i.e., is served from a different domain name), then it's going to be cross-domain anyway, regardless of protocol, and you remain out of luck.
« Last edit by admin on Sat Apr 14, 2012 10:52 am. »

Page: 1