Tips for Redirecting from a Success Page in an Iframe to a Full Page
Tips for Redirecting from a Success Page in an Iframe to a Full Page
Case:
The merchant’s success page opens inside an iframe on the website, and it does not look good.
Solutions:
Option 1: Design the merchant’s success page so that it displays properly in iframes/on mobile devices.
Option 2: Redirect the customer from the success page inside the iframe to a completely new page using a redirect.
This option requires a programmer on the merchant’s side to define JavaScript code on the merchant’s success page.
See an example:
The quotation marks may be reversed "
<script type="text/javascript">
parent.location.href = "http://www.yoursite.co.il/page.aspx"
</script>
Note that the address http://www.yoursite.co.il/page.aspx is the address of the actual success page.
If you also want to pass along the parameters received on the “success page”:
parent.location.herf = "http://www.yoursite.co.il/page.aspx?" +document.location.search
Note: Our system cannot execute parent.location.href because browsers block cross-site scripting.
Differences between window.top and window.parent