简体   繁体   中英

Is there any way instead of a JS hack where I can post from an iframe to another page outside the iframe?

Is there any way instead of a JS hack where I can post from an iframe to another page outside the iframe?

the iframe is posting data to a 3rd party and then just responding back with a URL which is the redirection URl thus we cannot set the form target. We are PCI compliant and thus we cannot use window.parent.location = url;

What it boils down to, it seems, is this:
1. You get a text url from a 3rd party in the iframe.
2. You want to change your page's location to that url.
3. Unless you have control over that 3rd party, all you are going to get is that text url.

Now, the only way to change your page's location automatically is with window.parent.location (or window.location .)

If changing the url of the page with javascript is not PCI compliant then you're trying to do something that is not PCI complicant.

<form>接受目标参数,例如target =“ _ parent”

在锚标记中,您可以设置target='_parent'这将导致将该网址加载到父窗口中。

No , the only way is by using javascript. But it's not really a hack to use window.parent.location = url;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM